From 5821d593bc162a87c1c8febd760652b1e5663fca Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 8 Nov 2024 15:26:00 +0530 Subject: [PATCH 01/68] added docker check to workflow --- .github/workflows/pull-request.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 75588cc4df..9d91c367b6 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -241,6 +241,35 @@ jobs: - name: Validate Documents run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql' + Docker-Start-Check: + name: Check if Talawa Admin app starts in Docker + runs-on: ubuntu-latest + steps: + - name: Checkout the Repository + uses: actions/checkout@v4 + + - name: Set up Docker + run: | + sudo apt-get update + sudo apt-get install -y docker.io + + - name: Run Docker Container + run: | + docker run -d --name talawa-admin-container -p 8080:8080 talawa-admin-app + + - name: Check if Talawa Admin App is running + run: | + nc -z localhost 8080 + + curl --fail --silent http://localhost:8080/index.html || exit 1 + + - name: Stop Docker Container + if: always() + run: | + docker stop talawa-admin-app-container + docker rm talawa-admin-app-container + + Check-Target-Branch: if: ${{ github.actor != 'dependabot[bot]' }} name: Check Target Branch From 81bbb3e9cf976e37352ae524f886a5ff3f5027f9 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 8 Nov 2024 16:52:39 +0530 Subject: [PATCH 02/68] made recommended changes to docker check in workflow --- .github/workflows/pull-request.yml | 43 +++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 9d91c367b6..099440bfb1 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -244,27 +244,46 @@ jobs: Docker-Start-Check: name: Check if Talawa Admin app starts in Docker runs-on: ubuntu-latest + needs: [Code-Quality-Checks] steps: - name: Checkout the Repository uses: actions/checkout@v4 - name: Set up Docker - run: | - sudo apt-get update - sudo apt-get install -y docker.io + uses: docker/setup-buildx-action@v3 + + - name: Build Docker image + run: | + docker build -t talawa-admin-app . - - name: Run Docker Container + - name: Run Docker Container run: | - docker run -d --name talawa-admin-container -p 8080:8080 talawa-admin-app - - - name: Check if Talawa Admin App is running + docker run -d --name talawa-admin-app-container -p 8080:8080 talawa-admin-app + + - name: Check if Talawa Admin App is running run: | - nc -z localhost 8080 - - curl --fail --silent http://localhost:8080/index.html || exit 1 + timeout=60 + while ! nc -z localhost 8080 && [ $timeout -gt 0 ]; do + sleep 1 + timeout=$((timeout-1)) + done + + if [ $timeout -eq 0 ]; then + echo "Timeout waiting for application to start" + exit 1 + fi + + # Retry curl up to 3 times with 5s delay + for i in {1..3}; do + if curl --fail --silent http://localhost:8080/index.html; then + exit 0 + fi + sleep 5 + done + exit 1 - - name: Stop Docker Container - if: always() + - name: Stop Docker Container + if: always() run: | docker stop talawa-admin-app-container docker rm talawa-admin-app-container From f8389f61abefdb2edb6c43f9b32759b07ff70283 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 8 Nov 2024 17:31:39 +0530 Subject: [PATCH 03/68] added changes to docker check inn workflow as recommended --- .github/workflows/pull-request.yml | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index df6fda018c..5ce2e16899 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -272,27 +272,12 @@ jobs: run: | docker run -d --name talawa-admin-app-container -p 8080:8080 talawa-admin-app - - name: Check if Talawa Admin App is running - run: | - timeout=60 - while ! nc -z localhost 8080 && [ $timeout -gt 0 ]; do - sleep 1 - timeout=$((timeout-1)) - done - - if [ $timeout -eq 0 ]; then - echo "Timeout waiting for application to start" - exit 1 - fi - - # Retry curl up to 3 times with 5s delay - for i in {1..3}; do - if curl --fail --silent http://localhost:8080/index.html; then - exit 0 - fi - sleep 5 - done - exit 1 + - name: Check if Talawa Admin app starts in Docker + runs-on: ubuntu-latest + needs: [Code-Quality-Checks] + steps: + - name: Checkout the Repository + uses: actions/checkout@v4 - name: Stop Docker Container if: always() From f54dcf2a6e7c520ca91b7870d6309702689818a1 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 8 Nov 2024 17:52:51 +0530 Subject: [PATCH 04/68] added changes --- .github/workflows/pull-request.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 5ce2e16899..738e47ad53 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -272,12 +272,18 @@ jobs: run: | docker run -d --name talawa-admin-app-container -p 8080:8080 talawa-admin-app - - name: Check if Talawa Admin app starts in Docker - runs-on: ubuntu-latest - needs: [Code-Quality-Checks] - steps: - - name: Checkout the Repository - uses: actions/checkout@v4 + - name: Check if Talawa Admin App is running + run: | + timeout=60 + while ! nc -z localhost 8080 && [ $timeout -gt 0 ]; do + sleep 1 + timeout=$((timeout-1)) + done + if [ $timeout -eq 0 ]; then + echo "Timeout waiting for application to start" + exit 1 + fi + curl --fail --silent http://localhost:8080/index.html || exit 1 - name: Stop Docker Container if: always() From b93aed69118b9c246aaa5cf2c0ce1333e55fd6ce Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 8 Nov 2024 22:14:02 +0530 Subject: [PATCH 05/68] updated indentation in pull-request.yml file --- .github/workflows/pull-request.yml | 74 +++++++++++++++--------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 738e47ad53..f89fb61dc3 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -254,43 +254,43 @@ jobs: run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql' Docker-Start-Check: - name: Check if Talawa Admin app starts in Docker - runs-on: ubuntu-latest - needs: [Code-Quality-Checks] - steps: - - name: Checkout the Repository - uses: actions/checkout@v4 - - - name: Set up Docker - uses: docker/setup-buildx-action@v3 - - - name: Build Docker image - run: | - docker build -t talawa-admin-app . - - - name: Run Docker Container - run: | - docker run -d --name talawa-admin-app-container -p 8080:8080 talawa-admin-app - - - name: Check if Talawa Admin App is running - run: | - timeout=60 - while ! nc -z localhost 8080 && [ $timeout -gt 0 ]; do - sleep 1 - timeout=$((timeout-1)) - done - if [ $timeout -eq 0 ]; then - echo "Timeout waiting for application to start" - exit 1 - fi - curl --fail --silent http://localhost:8080/index.html || exit 1 - - - name: Stop Docker Container - if: always() - run: | - docker stop talawa-admin-app-container - docker rm talawa-admin-app-container + name: Check if Talawa Admin app starts in Docker + runs-on: ubuntu-latest + needs: [Code-Quality-Checks] + steps: + - name: Checkout the Repository + uses: actions/checkout@v4 + + - name: Set up Docker + uses: docker/setup-buildx-action@v3 + - name: Build Docker image + run: | + docker build -t talawa-admin-app . + + - name: Run Docker Container + run: | + docker run -d --name talawa-admin-app-container -p 8080:8080 talawa-admin-app + + - name: Check if Talawa Admin App is running + run: | + timeout=60 + while ! nc -z localhost 8080 && [ $timeout -gt 0 ]; do + sleep 1 + timeout=$((timeout-1)) + done + if [ $timeout -eq 0 ]; then + echo "Timeout waiting for application to start" + exit 1 + fi + curl --fail --silent http://localhost:8080/index.html || exit 1 + + - name: Stop Docker Container + if: always() + run: | + docker stop talawa-admin-app-container + docker rm talawa-admin-app-container + Check-Target-Branch: if: ${{ github.actor != 'dependabot[bot]' }} @@ -301,4 +301,4 @@ jobs: if: github.event.pull_request.base.ref != 'develop' run: | echo "Error: Pull request target branch must be 'develop'. Please refer PR_GUIDELINES.md" - exit 1 + exit 1 \ No newline at end of file From a0ee51150aa3ab8f4f8b2ec7de9e110d0bb07b4d Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 8 Nov 2024 22:21:58 +0530 Subject: [PATCH 06/68] updated indentation in pull-request.yml file --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index f89fb61dc3..e7e1dda87c 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -256,7 +256,7 @@ jobs: Docker-Start-Check: name: Check if Talawa Admin app starts in Docker runs-on: ubuntu-latest - needs: [Code-Quality-Checks] + needs: [Code-Quality-Checks, Test-Application] steps: - name: Checkout the Repository uses: actions/checkout@v4 From 235d1631b475af29f9f6c7d3c33bac47fa2a5247 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 10 Nov 2024 19:29:42 +0530 Subject: [PATCH 07/68] added Dockerfile and Docker-compose.yml file --- .dockerignore | 9 +++++++++ Dockerfile | 15 +++++++++++++++ config/vite.config.ts | 5 +++-- docker-compose.yaml | 11 +++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..d0adaf2671 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +node_modules +videos +images +data +.env +.git +.gitignore +.github +.dockerignore \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..fef086f72d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:20.10.0 AS build + +WORKDIR /usr/src/app + +COPY . . + +RUN npm install -g typescript + +RUN npm install + +RUN npm run build + +EXPOSE 4321 + +CMD ["npm", "run", "serve"] \ No newline at end of file diff --git a/config/vite.config.ts b/config/vite.config.ts index 71ce6c6f47..28cd47ae5a 100644 --- a/config/vite.config.ts +++ b/config/vite.config.ts @@ -23,8 +23,9 @@ export default defineConfig({ ], server: { // this ensures that the browser opens upon server start - open: true, - // this sets a default port to 3000 + open: false, + host: '0.0.0.0', + // this sets a default port to 4321 port: 4321, }, }); diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000000..5936109b22 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,11 @@ +services: + app: + build: + context: . + dockerfile: Dockerfile + environment: + - REACT_APP_TALAWA_URL=${REACT_APP_TALAWA_URL} + # volumes: + # - .:/usr/src/app + ports: + - 4321:4321 From 66f48432ee30c0db8ca5941271df5bdd4b4c6bfa Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 10 Nov 2024 20:54:14 +0530 Subject: [PATCH 08/68] added Dockerfile and Docker-compose.yml file --- .github/workflows/pull-request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e7e1dda87c..0950c572c9 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -270,12 +270,12 @@ jobs: - name: Run Docker Container run: | - docker run -d --name talawa-admin-app-container -p 8080:8080 talawa-admin-app + docker run -d --name talawa-admin-app-container -p 4321:4321 talawa-admin-app - name: Check if Talawa Admin App is running run: | timeout=60 - while ! nc -z localhost 8080 && [ $timeout -gt 0 ]; do + while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do sleep 1 timeout=$((timeout-1)) done @@ -283,7 +283,7 @@ jobs: echo "Timeout waiting for application to start" exit 1 fi - curl --fail --silent http://localhost:8080/index.html || exit 1 + curl --fail --silent http://localhost:4321/ || exit 1 - name: Stop Docker Container if: always() From 0fa9fe5f66b2d4c2a47e35b6962b33537783c812 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 10 Nov 2024 21:15:05 +0530 Subject: [PATCH 09/68] updated .docker-ignore file --- .dockerignore | 19 ++++++++++++++----- .github/workflows/pull-request.yml | 4 ++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.dockerignore b/.dockerignore index d0adaf2671..466682cc09 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,9 +1,18 @@ node_modules -videos -images -data -.env +npm-debug.log +Dockerfile +.dockerignore .git .gitignore +README.md +.env +.env.* +dist +coverage +.nyc_output +*.md .github -.dockerignore \ No newline at end of file +tests +__tests__ +*.test.* +*.spec.* \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0950c572c9..a3e478e5d4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -274,7 +274,7 @@ jobs: - name: Check if Talawa Admin App is running run: | - timeout=60 + timeout=${HEALTH_CHECK_TIMEOUT:-60} while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do sleep 1 timeout=$((timeout-1)) @@ -283,7 +283,7 @@ jobs: echo "Timeout waiting for application to start" exit 1 fi - curl --fail --silent http://localhost:4321/ || exit 1 + curl --fail --silent http://localhost:4321/health || exit 1 - name: Stop Docker Container if: always() From cfdeff50de91354869a5f7ed05dcc4faf440168b Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 11 Nov 2024 11:45:24 +0530 Subject: [PATCH 10/68] added recommended changes by code rabbit --- Dockerfile | 6 +++--- docker-compose.yaml | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index fef086f72d..6b13a712b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,12 @@ FROM node:20.10.0 AS build WORKDIR /usr/src/app -COPY . . - -RUN npm install -g typescript +COPY package*.json ./ RUN npm install +COPY . . + RUN npm run build EXPOSE 4321 diff --git a/docker-compose.yaml b/docker-compose.yaml index 5936109b22..069c63bb01 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,7 +5,17 @@ services: dockerfile: Dockerfile environment: - REACT_APP_TALAWA_URL=${REACT_APP_TALAWA_URL} - # volumes: - # - .:/usr/src/app ports: - 4321:4321 + user: node + healthcheck: + test: ['CMD', 'curl', '-f', 'http://localhost:4321'] + interval: 30s + timeout: 10s + retries: 3 + restart: unless-stopped + deploy: + resources: + limits: + cpus: '1' + memory: 1G From e188853def90c0bc0ee26f835684e942329edb7d Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 11 Nov 2024 11:50:33 +0530 Subject: [PATCH 11/68] added recommended changes by code rabbit --- .github/workflows/pull-request.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index a3e478e5d4..ec9efc486f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -263,14 +263,26 @@ jobs: - name: Set up Docker uses: docker/setup-buildx-action@v3 - + with: + buildkitd-flags: --debug + driver-opts: | + image=moby/buildkit:latest + cache-from: type=gha + cache-to: type=gha,mode=max + - name: Build Docker image run: | + set -e + echo "Building Docker image..." docker build -t talawa-admin-app . + echo "Docker image built successfully" - name: Run Docker Container run: | + set -e + echo "Started Docker container..." docker run -d --name talawa-admin-app-container -p 4321:4321 talawa-admin-app + echo "Docker container started successfully" - name: Check if Talawa Admin App is running run: | @@ -290,6 +302,7 @@ jobs: run: | docker stop talawa-admin-app-container docker rm talawa-admin-app-container + exit 1 Check-Target-Branch: From 9a2b42854a4e66fdc3fb8cf86ab89a05aad32b6c Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 11 Nov 2024 11:57:20 +0530 Subject: [PATCH 12/68] added recommended changes by code rabbit --- .github/workflows/pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index ec9efc486f..18609bdb16 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -286,7 +286,8 @@ jobs: - name: Check if Talawa Admin App is running run: | - timeout=${HEALTH_CHECK_TIMEOUT:-60} + echo "Starting health check for application on localhost:4321" + timeout=${HEALTH_CHECK_TIMEOUT:-120} while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do sleep 1 timeout=$((timeout-1)) From 12e5474795fa3884ef1855f6db5ddef71975d37c Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 11 Nov 2024 12:08:34 +0530 Subject: [PATCH 13/68] added recommended changes by code rabbit --- .dockerignore | 13 ++++++++++--- .env.example | 2 ++ .github/workflows/pull-request.yml | 12 +++++++++--- docker-compose.yaml | 2 +- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.dockerignore b/.dockerignore index 466682cc09..0ef78f43dc 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,10 +1,8 @@ node_modules npm-debug.log Dockerfile -.dockerignore .git .gitignore -README.md .env .env.* dist @@ -15,4 +13,13 @@ coverage tests __tests__ *.test.* -*.spec.* \ No newline at end of file +*.spec.* +# Development files +*.log +*.lock +.DS_Store +.idea +.vscode +# Build artifacts +build +out \ No newline at end of file diff --git a/.env.example b/.env.example index de7cff92ec..a4a5137959 100644 --- a/.env.example +++ b/.env.example @@ -29,3 +29,5 @@ REACT_APP_BACKEND_WEBSOCKET_URL=ws://localhost:4000/graphql/ # If you want to logs Compiletime and Runtime error , warning and info write YES or if u want to # keep the console clean leave it blank ALLOW_LOGS= + +REACT_APP_TALAWA_URL=http://localhost:4000 \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 18609bdb16..fb596c3fa8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -286,24 +286,30 @@ jobs: - name: Check if Talawa Admin App is running run: | - echo "Starting health check for application on localhost:4321" - timeout=${HEALTH_CHECK_TIMEOUT:-120} + timeout="${HEALTH_CHECK_TIMEOUT:-120}" + echo "Starting health check with ${timeout}s timeout" while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do sleep 1 + timeout=$((timeout-1)) + if [ $((timeout % 10)) -eq 0]; then + echo "Still waiting for app to start... ${timeout}s remaining" + fi done if [ $timeout -eq 0 ]; then echo "Timeout waiting for application to start" exit 1 fi + echo "Port check passed, verifying health endpoint..." curl --fail --silent http://localhost:4321/health || exit 1 + echo "Health check passed successfully" - name: Stop Docker Container if: always() run: | docker stop talawa-admin-app-container docker rm talawa-admin-app-container - exit 1 + Check-Target-Branch: diff --git a/docker-compose.yaml b/docker-compose.yaml index 069c63bb01..a852ceddc1 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,7 +4,7 @@ services: context: . dockerfile: Dockerfile environment: - - REACT_APP_TALAWA_URL=${REACT_APP_TALAWA_URL} + - REACT_APP_TALAWA_URL=${REACT_APP_TALAWA_URL:?Error: REACT_APP_TALAWA_URL is required} ports: - 4321:4321 user: node From 17a12f7d92f3570792fedc4cc74dbfb4cdf1c11c Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 11 Nov 2024 12:13:32 +0530 Subject: [PATCH 14/68] added recommended changes by code rabbit --- docker-compose.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index a852ceddc1..41d3a4dd65 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -12,7 +12,8 @@ services: test: ['CMD', 'curl', '-f', 'http://localhost:4321'] interval: 30s timeout: 10s - retries: 3 + retries: 5 + start_period: 40s restart: unless-stopped deploy: resources: From a44ecdbdee50619456ccb909244b84ab92ed3020 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 11 Nov 2024 12:24:49 +0530 Subject: [PATCH 15/68] added recommended changes by code rabbit --- .env.example | 2 -- .github/workflows/pull-request.yml | 4 +++- docker-compose.yaml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index a4a5137959..de7cff92ec 100644 --- a/.env.example +++ b/.env.example @@ -29,5 +29,3 @@ REACT_APP_BACKEND_WEBSOCKET_URL=ws://localhost:4000/graphql/ # If you want to logs Compiletime and Runtime error , warning and info write YES or if u want to # keep the console clean leave it blank ALLOW_LOGS= - -REACT_APP_TALAWA_URL=http://localhost:4000 \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index fb596c3fa8..ffc815153a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -292,12 +292,14 @@ jobs: sleep 1 timeout=$((timeout-1)) - if [ $((timeout % 10)) -eq 0]; then + if [ $((timeout % 10)) -eq 0 ]; then echo "Still waiting for app to start... ${timeout}s remaining" fi done if [ $timeout -eq 0 ]; then echo "Timeout waiting for application to start" + echo "Container logs:" + docker logs talawa-admin-app-container exit 1 fi echo "Port check passed, verifying health endpoint..." diff --git a/docker-compose.yaml b/docker-compose.yaml index 41d3a4dd65..ea273ac632 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -9,7 +9,8 @@ services: - 4321:4321 user: node healthcheck: - test: ['CMD', 'curl', '-f', 'http://localhost:4321'] + test: + ['CMD-SHELL', 'wget --spider -q http://localhost:4321/health || exit 1'] interval: 30s timeout: 10s retries: 5 From 526a2cf76e4f2c850628490a51ae3ccd507acd19 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 11 Nov 2024 17:22:37 +0530 Subject: [PATCH 16/68] properly formatted code --- .github/workflows/pull-request.yml | 59 ++++++++++++++---------------- 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index ffc815153a..4f8aabfc2f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -46,7 +46,7 @@ jobs: - name: Check formatting if: steps.changed-files.outputs.only_changed != 'true' run: npm run format:check - + - name: Run formatting if check fails if: failure() run: npm run format @@ -57,10 +57,10 @@ jobs: - name: Check for linting errors in modified files if: steps.changed-files.outputs.only_changed != 'true' - env: + env: CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py - + - name: Check for TSDoc comments run: npm run check-tsdoc # Run the TSDoc check script @@ -89,7 +89,7 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - + - name: Get Changed Unauthorized files id: changed-unauth-files uses: tj-actions/changed-files@v40 @@ -123,10 +123,10 @@ jobs: ISSUE_GUIDELINES.md PR_GUIDELINES.md README.md - + - name: List all changed unauthorized files if: steps.changed-unauth-files.outputs.any_changed == 'true' || steps.changed-unauth-files.outputs.any_deleted == 'true' - env: + env: CHANGED_UNAUTH_FILES: ${{ steps.changed-unauth-files.outputs.all_changed_files }} run: | for file in ${CHANGED_UNAUTH_FILES}; do @@ -147,14 +147,14 @@ jobs: uses: tj-actions/changed-files@v40 - name: Echo number of changed files - env: + env: CHANGED_FILES_COUNT: ${{ steps.changed-files.outputs.all_changed_files_count }} run: | echo "Number of files changed: $CHANGED_FILES_COUNT" - name: Check if the number of changed files is less than 100 if: steps.changed-files.outputs.all_changed_files_count > 100 - env: + env: CHANGED_FILES_COUNT: ${{ steps.changed-files.outputs.all_changed_files_count }} run: | echo "Error: Too many files (greater than 100) changed in the pull request." @@ -194,15 +194,15 @@ jobs: - name: Install Dependencies run: npm install - + - name: Get changed TypeScript files id: changed-files uses: tj-actions/changed-files@v40 - + - name: Run tests if: steps.changed-files.outputs.only_changed != 'true' - run: npm run test -- --watchAll=false --coverage - + run: npm run test -- --watchAll=false --coverage + - name: TypeScript compilation for changed files run: | for file in ${{ steps.changed-files.outputs.all_files }}; do @@ -210,7 +210,7 @@ jobs: npx tsc --noEmit "$file" fi done - + - name: Present and Upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}} uses: codecov/codecov-action@v4 with: @@ -222,7 +222,7 @@ jobs: - name: Test acceptable level of code coverage uses: VeryGoodOpenSource/very_good_coverage@v2 with: - path: "./coverage/lcov.info" + path: './coverage/lcov.info' min_coverage: 95.0 Graphql-Inspector: @@ -240,15 +240,15 @@ jobs: - name: resolve dependency run: npm install -g @graphql-inspector/cli - + - name: Clone API Repository run: | # Retrieve the complete branch name directly from the GitHub context FULL_BRANCH_NAME=${{ github.base_ref }} echo "FULL_Branch_NAME: $FULL_BRANCH_NAME" - + # Clone the specified repository using the extracted branch name - git clone --branch $FULL_BRANCH_NAME https://github.com/PalisadoesFoundation/talawa-api && ls -a + git clone --branch $FULL_BRANCH_NAME https://github.com/PalisadoesFoundation/talawa-api && ls -a - name: Validate Documents run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql' @@ -260,15 +260,14 @@ jobs: steps: - name: Checkout the Repository uses: actions/checkout@v4 - + - name: Set up Docker uses: docker/setup-buildx-action@v3 - with: - buildkitd-flags: --debug - driver-opts: | - image=moby/buildkit:latest - cache-from: type=gha - cache-to: type=gha,mode=max + with: + driver-opts: | + image=moby/buildkit:latest + cache-from: type=gha + cache-to: type=gha,mode=max - name: Build Docker image run: | @@ -276,7 +275,7 @@ jobs: echo "Building Docker image..." docker build -t talawa-admin-app . echo "Docker image built successfully" - + - name: Run Docker Container run: | set -e @@ -303,17 +302,15 @@ jobs: exit 1 fi echo "Port check passed, verifying health endpoint..." - curl --fail --silent http://localhost:4321/health || exit 1 + curl --fail --silent http://localhost:4321/ || exit 1 echo "Health check passed successfully" - - - name: Stop Docker Container + + - name: Stop Docker Container if: always() run: | docker stop talawa-admin-app-container docker rm talawa-admin-app-container - - Check-Target-Branch: if: ${{ github.actor != 'dependabot[bot]' }} name: Check Target Branch @@ -323,4 +320,4 @@ jobs: if: github.event.pull_request.base.ref != 'develop' run: | echo "Error: Pull request target branch must be 'develop'. Please refer PR_GUIDELINES.md" - exit 1 \ No newline at end of file + exit 1 From 82836f05f2f83b12e3b2b89b11e40b74de25ee4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:53:41 -0800 Subject: [PATCH 17/68] chore(deps): bump sass from 1.80.6 to 1.80.7 (#2433) Bumps [sass](https://github.com/sass/dart-sass) from 1.80.6 to 1.80.7. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.80.6...1.80.7) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0add51da52..165eb104cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -112,7 +112,7 @@ "jest-preview": "^0.3.1", "lint-staged": "^15.2.8", "postcss-modules": "^6.0.0", - "sass": "^1.80.6", + "sass": "^1.80.7", "tsx": "^4.19.1", "vite-plugin-svgr": "^4.2.0", "whatwg-fetch": "^3.6.20" @@ -10617,9 +10617,9 @@ } }, "node_modules/immutable": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.5.tgz", - "integrity": "sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.2.tgz", + "integrity": "sha512-1NU7hWZDkV7hJ4PJ9dur9gTNQ4ePNPN4k9/0YhwjzykTi/+3Q5pF93YU5QoVj8BuOnhLgaY8gs0U2pj4kSYVcw==", "devOptional": true }, "node_modules/import-fresh": { @@ -16284,13 +16284,13 @@ } }, "node_modules/sass": { - "version": "1.80.6", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.80.6.tgz", - "integrity": "sha512-ccZgdHNiBF1NHBsWvacvT5rju3y1d/Eu+8Ex6c21nHp2lZGLBEtuwc415QfiI1PJa1TpCo3iXwwSRjRpn2Ckjg==", + "version": "1.80.7", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.80.7.tgz", + "integrity": "sha512-MVWvN0u5meytrSjsU7AWsbhoXi1sc58zADXFllfZzbsBT1GHjjar6JwBINYPRrkx/zqnQ6uqbQuHgE95O+C+eQ==", "devOptional": true, "dependencies": { "chokidar": "^4.0.0", - "immutable": "^4.0.0", + "immutable": "^5.0.2", "source-map-js": ">=0.6.2 <2.0.0" }, "bin": { diff --git a/package.json b/package.json index 892a1331e4..f31394fce1 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,7 @@ "jest-preview": "^0.3.1", "lint-staged": "^15.2.8", "postcss-modules": "^6.0.0", - "sass": "^1.80.6", + "sass": "^1.80.7", "tsx": "^4.19.1", "vite-plugin-svgr": "^4.2.0", "whatwg-fetch": "^3.6.20" From a97314cbf994d3b02c24a458cd256db1a4148b27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:54:06 -0800 Subject: [PATCH 18/68] chore(deps): bump eslint-plugin-import from 2.30.0 to 2.31.0 (#2434) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.30.0 to 2.31.0. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.30.0...v2.31.0) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 13 +++++++------ package.json | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 165eb104cc..872a2773ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -99,7 +99,7 @@ "babel-jest": "^29.7.0", "cross-env": "^7.0.3", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.30.0", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.8.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react": "^7.37.1", @@ -8910,9 +8910,9 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz", - "integrity": "sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==", + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", + "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", "dev": true, "dependencies": { "@rtsao/scc": "^1.1.0", @@ -8923,7 +8923,7 @@ "debug": "^3.2.7", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.9.0", + "eslint-module-utils": "^2.12.0", "hasown": "^2.0.2", "is-core-module": "^2.15.1", "is-glob": "^4.0.3", @@ -8932,13 +8932,14 @@ "object.groupby": "^1.0.3", "object.values": "^1.2.0", "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.8", "tsconfig-paths": "^3.15.0" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" } }, "node_modules/eslint-plugin-import/node_modules/debug": { diff --git a/package.json b/package.json index f31394fce1..89f47e405d 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "babel-jest": "^29.7.0", "cross-env": "^7.0.3", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.30.0", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.8.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react": "^7.37.1", From 32eb6a9d37f08c9afa2670ddcd12c162a2d04c51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:54:35 -0800 Subject: [PATCH 19/68] chore(deps): bump @mui/x-charts from 7.22.1 to 7.22.2 (#2435) Bumps [@mui/x-charts](https://github.com/mui/mui-x/tree/HEAD/packages/x-charts) from 7.22.1 to 7.22.2. - [Release notes](https://github.com/mui/mui-x/releases) - [Changelog](https://github.com/mui/mui-x/blob/v7.22.2/CHANGELOG.md) - [Commits](https://github.com/mui/mui-x/commits/v7.22.2/packages/x-charts) --- updated-dependencies: - dependency-name: "@mui/x-charts" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 872a2773ca..a06030b145 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@mui/material": "^6.1.6", "@mui/private-theming": "^6.1.6", "@mui/system": "^6.1.6", - "@mui/x-charts": "^7.22.1", + "@mui/x-charts": "^7.22.2", "@mui/x-data-grid": "^7.22.1", "@mui/x-date-pickers": "^7.22.1", "@pdfme/generator": "^5.1.7", @@ -3938,9 +3938,9 @@ } }, "node_modules/@mui/x-charts": { - "version": "7.22.1", - "resolved": "https://registry.npmjs.org/@mui/x-charts/-/x-charts-7.22.1.tgz", - "integrity": "sha512-zgr8CN4yLen5puqaX7Haj5+AoVG7E13HHsIiDoEAuQvuFDF0gKTxTTdLSKXqhd1qJUIIzJaztZtrr3YCVrENqw==", + "version": "7.22.2", + "resolved": "https://registry.npmjs.org/@mui/x-charts/-/x-charts-7.22.2.tgz", + "integrity": "sha512-0Y2du4Ed7gOT53l8vVJ4vKT+Jz4Dh/iHnLy8TtL3+XhbPH9Ndu9Q30WwyyzOn84yt37hSUru/njQ1BWaSvVPHw==", "dependencies": { "@babel/runtime": "^7.25.7", "@mui/utils": "^5.16.6 || ^6.0.0", diff --git a/package.json b/package.json index 89f47e405d..e1eba54ff0 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@mui/material": "^6.1.6", "@mui/private-theming": "^6.1.6", "@mui/system": "^6.1.6", - "@mui/x-charts": "^7.22.1", + "@mui/x-charts": "^7.22.2", "@mui/x-data-grid": "^7.22.1", "@mui/x-date-pickers": "^7.22.1", "@pdfme/schemas": "^5.1.6", From ab509f625c2b086870e0d10971002391deefdec4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:54:56 -0800 Subject: [PATCH 20/68] chore(deps): bump @types/react from 18.3.3 to 18.3.12 (#2436) Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.12. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index a06030b145..f54418a39c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -85,7 +85,7 @@ "@types/js-cookie": "^3.0.6", "@types/node": "^22.5.4", "@types/node-fetch": "^2.6.10", - "@types/react": "^18.3.3", + "@types/react": "^18.3.12", "@types/react-beautiful-dnd": "^13.1.8", "@types/react-bootstrap": "^0.32.37", "@types/react-chartjs-2": "^2.5.7", @@ -5602,9 +5602,9 @@ "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==" }, "node_modules/@types/react": { - "version": "18.3.3", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", - "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", + "version": "18.3.12", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", + "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" diff --git a/package.json b/package.json index e1eba54ff0..4560ea5d0e 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "@types/js-cookie": "^3.0.6", "@types/node": "^22.5.4", "@types/node-fetch": "^2.6.10", - "@types/react": "^18.3.3", + "@types/react": "^18.3.12", "@types/react-beautiful-dnd": "^13.1.8", "@types/react-chartjs-2": "^2.5.7", "@types/react-bootstrap": "^0.32.37", From fb913e1882410386564f4c6f2540fe66e2471ae5 Mon Sep 17 00:00:00 2001 From: Peter Harrison <16875803+palisadoes@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:32:40 -0800 Subject: [PATCH 21/68] Update pull-request.yml --- .github/workflows/pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index aaeebc8345..0cb1b76ee4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -259,7 +259,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check if the target branch is develop - if: github.event.pull_request.base.ref != 'develop' + if: github.event.pull_request.base.ref != 'develop-postgres' run: | - echo "Error: Pull request target branch must be 'develop'. Please refer PR_GUIDELINES.md" + echo "Error: Pull request target branch must be 'develop-postgres'. Please refer PR_GUIDELINES.md" exit 1 From d4fca6ff955079d439d4084382480d35910f6a47 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 15 Nov 2024 10:06:49 +0530 Subject: [PATCH 22/68] trying to make docker check pass --- .github/workflows/pull-request.yml | 107 +++++++++++++++-------------- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4f8aabfc2f..af6cb6f778 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -254,62 +254,63 @@ jobs: run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql' Docker-Start-Check: - name: Check if Talawa Admin app starts in Docker - runs-on: ubuntu-latest - needs: [Code-Quality-Checks, Test-Application] - steps: - - name: Checkout the Repository - uses: actions/checkout@v4 - - - name: Set up Docker - uses: docker/setup-buildx-action@v3 - with: - driver-opts: | - image=moby/buildkit:latest - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Build Docker image - run: | - set -e - echo "Building Docker image..." - docker build -t talawa-admin-app . - echo "Docker image built successfully" + name: Check if Talawa Admin app starts in Docker + runs-on: ubuntu-latest + needs: [Code-Quality-Checks, Test-Application] + steps: + - name: Checkout the Repository + uses: actions/checkout@v4 + + - name: Set up Docker + uses: docker/setup-buildx-action@v3 + with: + driver-opts: | + image=moby/buildkit:latest + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Build Docker image + run: | + set -e + echo "Building Docker image..." + docker build -t talawa-admin-app . + echo "Docker image built successfully" + + - name: Run Docker Container + run: | + set -e + echo "Started Docker container..." + docker run -d --name talawa-admin-app-container -p 4321:4321 talawa-admin-app + echo "Docker container started successfully" + + - name: Check if Talawa Admin App is running on port 4321 + run: | + timeout="${HEALTH_CHECK_TIMEOUT:-120}" + echo "Starting health check with ${timeout}s timeout" + + # Wait for the app to open the port 4321 + while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do + sleep 1 + timeout=$((timeout-1)) + if [ $((timeout % 10)) -eq 0 ]; then + echo "Still waiting for app to start... ${timeout}s remaining" + fi + done - - name: Run Docker Container - run: | - set -e - echo "Started Docker container..." - docker run -d --name talawa-admin-app-container -p 4321:4321 talawa-admin-app - echo "Docker container started successfully" + if [ $timeout -eq 0 ]; then + echo "Timeout waiting for application to start" + echo "Container logs:" + docker logs talawa-admin-app-container + exit 1 + fi - - name: Check if Talawa Admin App is running - run: | - timeout="${HEALTH_CHECK_TIMEOUT:-120}" - echo "Starting health check with ${timeout}s timeout" - while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do - sleep 1 - - timeout=$((timeout-1)) - if [ $((timeout % 10)) -eq 0 ]; then - echo "Still waiting for app to start... ${timeout}s remaining" - fi - done - if [ $timeout -eq 0 ]; then - echo "Timeout waiting for application to start" - echo "Container logs:" - docker logs talawa-admin-app-container - exit 1 - fi - echo "Port check passed, verifying health endpoint..." - curl --fail --silent http://localhost:4321/ || exit 1 - echo "Health check passed successfully" + echo "Port check passed successfully" - - name: Stop Docker Container - if: always() - run: | - docker stop talawa-admin-app-container - docker rm talawa-admin-app-container + - name: Stop Docker Container + if: always() + run: | + docker stop talawa-admin-app-container + docker rm talawa-admin-app-container Check-Target-Branch: if: ${{ github.actor != 'dependabot[bot]' }} From 7966dda7572dc8df715148d5a892f25656da5cfa Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 15 Nov 2024 10:17:21 +0530 Subject: [PATCH 23/68] trying to make docker check pass --- .github/workflows/pull-request.yml | 106 ++++++++++++++--------------- 1 file changed, 52 insertions(+), 54 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index af6cb6f778..f12f363e3e 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -254,63 +254,61 @@ jobs: run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql' Docker-Start-Check: - name: Check if Talawa Admin app starts in Docker - runs-on: ubuntu-latest - needs: [Code-Quality-Checks, Test-Application] - steps: - - name: Checkout the Repository - uses: actions/checkout@v4 - - - name: Set up Docker - uses: docker/setup-buildx-action@v3 - with: - driver-opts: | - image=moby/buildkit:latest - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Build Docker image - run: | - set -e - echo "Building Docker image..." - docker build -t talawa-admin-app . - echo "Docker image built successfully" - - - name: Run Docker Container - run: | - set -e - echo "Started Docker container..." - docker run -d --name talawa-admin-app-container -p 4321:4321 talawa-admin-app - echo "Docker container started successfully" - - - name: Check if Talawa Admin App is running on port 4321 - run: | - timeout="${HEALTH_CHECK_TIMEOUT:-120}" - echo "Starting health check with ${timeout}s timeout" - - # Wait for the app to open the port 4321 - while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do - sleep 1 - timeout=$((timeout-1)) - if [ $((timeout % 10)) -eq 0 ]; then - echo "Still waiting for app to start... ${timeout}s remaining" - fi - done + name: Check if Talawa Admin app starts in Docker + runs-on: ubuntu-latest + needs: [Code-Quality-Checks, Test-Application] + steps: + - name: Checkout the Repository + uses: actions/checkout@v4 - if [ $timeout -eq 0 ]; then - echo "Timeout waiting for application to start" - echo "Container logs:" - docker logs talawa-admin-app-container - exit 1 - fi + - name: Set up Docker + uses: docker/setup-buildx-action@v3 + with: + driver-opts: | + image=moby/buildkit:latest + cache-from: type=gha + cache-to: type=gha,mode=max - echo "Port check passed successfully" + - name: Build Docker image + run: | + set -e + echo "Building Docker image..." + docker build -t talawa-admin-app . + echo "Docker image built successfully" - - name: Stop Docker Container - if: always() - run: | - docker stop talawa-admin-app-container - docker rm talawa-admin-app-container + - name: Run Docker Container + run: | + set -e + echo "Started Docker container..." + docker run -d --name talawa-admin-app-container -p 4321:4321 talawa-admin-app + echo "Docker container started successfully" + + - name: Check if Talawa Admin App is running + run: | + timeout="${HEALTH_CHECK_TIMEOUT:-120}" + echo "Starting health check with ${timeout}s timeout" + while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do + sleep 1 + + timeout=$((timeout-1)) + if [ $((timeout % 10)) -eq 0 ]; then + echo "Still waiting for app to start... ${timeout}s remaining" + fi + done + + if [ $timeout -eq 0 ]; then + echo "Timeout waiting for application to start" + echo "Container logs:" + docker logs talawa-admin-app-container + exit 1 + fi + echo "Port check passed, verifying health endpoint..." + + - name: Stop Docker Container + if: always() + run: | + docker stop talawa-admin-app-container + docker rm talawa-admin-app-container Check-Target-Branch: if: ${{ github.actor != 'dependabot[bot]' }} From 96d5e9aeaf0d942579933cbfd52f06d473236a9b Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 15 Nov 2024 11:40:48 +0530 Subject: [PATCH 24/68] updated INSTALLATION.md --- .github/workflows/pull-request.yml | 2 +- INSTALLATION.md | 25 +++++++++++++++++++++++++ docker-compose.yaml | 23 ----------------------- 3 files changed, 26 insertions(+), 24 deletions(-) delete mode 100644 docker-compose.yaml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3500ddf8ad..799cba8ab8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -287,7 +287,7 @@ jobs: run: | timeout="${HEALTH_CHECK_TIMEOUT:-120}" echo "Starting health check with ${timeout}s timeout" - while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do + while ! nc -z localhost 4321 && [ "$timeout" -gt 0 ]; do sleep 1 timeout=$((timeout-1)) diff --git a/INSTALLATION.md b/INSTALLATION.md index 5813b7d1cb..10c818fa4b 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -13,6 +13,9 @@ This document provides instructions on how to set up and start a running instanc - [Install node.js](#install-nodejs) - [Install TypeScript](#install-typescript) - [Install Required Packages](#install-required-packages) +- [Installation using Docker](#installation-using-docker) + - [Build the Docker Image:](#build-the-docker-image) + - [Run the Docker container:](#run-the-docker-container) - [Configuration](#configuration) - [Creating .env file](#creating-env-file) - [Setting up PORT in .env file](#setting-up-port-in-env-file) @@ -145,6 +148,28 @@ npm install The prerequisites are now installed. The next step will be to get the app up and running. +# Installation using Docker + +If you prefer to use Docker, you can install the app using the following command: + +## Build the Docker Image: + +Run the following command to build the Docker image: + +``` +docker build -t talawa-admin . +``` + +## Run the Docker container: + +After the build is complete, run the Docker container using this command: + +``` +docker run -p 4321:4321 talawa-admin +``` + +This will expose the container's port 4321 on your local machine, making the application accessible at http://localhost:4321. + # Configuration It's important to configure Talawa-Admin. Here's how to do it. diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index ea273ac632..0000000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,23 +0,0 @@ -services: - app: - build: - context: . - dockerfile: Dockerfile - environment: - - REACT_APP_TALAWA_URL=${REACT_APP_TALAWA_URL:?Error: REACT_APP_TALAWA_URL is required} - ports: - - 4321:4321 - user: node - healthcheck: - test: - ['CMD-SHELL', 'wget --spider -q http://localhost:4321/health || exit 1'] - interval: 30s - timeout: 10s - retries: 5 - start_period: 40s - restart: unless-stopped - deploy: - resources: - limits: - cpus: '1' - memory: 1G From ef0894452ffd3fa01152a2cc3c951d65c5668e43 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 15 Nov 2024 11:44:00 +0530 Subject: [PATCH 25/68] updated INSTALLATION.md --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 799cba8ab8..3500ddf8ad 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -287,7 +287,7 @@ jobs: run: | timeout="${HEALTH_CHECK_TIMEOUT:-120}" echo "Starting health check with ${timeout}s timeout" - while ! nc -z localhost 4321 && [ "$timeout" -gt 0 ]; do + while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do sleep 1 timeout=$((timeout-1)) From 8236c9a9f495630df92ce14635aa0b1b77713518 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 15 Nov 2024 12:35:30 +0530 Subject: [PATCH 26/68] added recommended changes to INSTALLATION.md --- INSTALLATION.md | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/INSTALLATION.md b/INSTALLATION.md index 10c818fa4b..22b9af3bd3 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -14,8 +14,8 @@ This document provides instructions on how to set up and start a running instanc - [Install TypeScript](#install-typescript) - [Install Required Packages](#install-required-packages) - [Installation using Docker](#installation-using-docker) - - [Build the Docker Image:](#build-the-docker-image) - - [Run the Docker container:](#run-the-docker-container) + - [Development Setup](#development-setup) + - [Production Setup](#production-setup) - [Configuration](#configuration) - [Creating .env file](#creating-env-file) - [Setting up PORT in .env file](#setting-up-port-in-env-file) @@ -150,9 +150,17 @@ The prerequisites are now installed. The next step will be to get the app up and # Installation using Docker +1. Install Docker on your system: + - [Docker Desktop for Windows/Mac](https://www.docker.com/products/docker-desktop) + - [Docker Engine for Linux](https://docs.docker.com/engine/install/) + +## Development Setup + If you prefer to use Docker, you can install the app using the following command: -## Build the Docker Image: +1. Create a `.env` file as described in the Configuration section + +2. Build the Docker Image: Run the following command to build the Docker image: @@ -160,7 +168,7 @@ Run the following command to build the Docker image: docker build -t talawa-admin . ``` -## Run the Docker container: +3. Run the Docker container: After the build is complete, run the Docker container using this command: @@ -168,7 +176,23 @@ After the build is complete, run the Docker container using this command: docker run -p 4321:4321 talawa-admin ``` -This will expose the container's port 4321 on your local machine, making the application accessible at http://localhost:4321. +The application will be accessible at `http://localhost:4321` + +## Production Setup + +1. Build the Docker image: + + ```bash + docker build -t talawa-admin . + ``` + +2. Run the container: + ```bash + docker run -p 4321:4321 \ + -e REACT_APP_TALAWA_URL=http://your-api-url:4000/graphql/ \ + -e REACT_APP_BACKEND_WEBSOCKET_URL=ws://your-api-url:4000/graphql/ \ + talawa-admin + ``` # Configuration From b09c6966d59929b13e14ab6a0cca36a49d78b675 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 15 Nov 2024 12:38:36 +0530 Subject: [PATCH 27/68] added recommended changes to INSTALLATION.md --- INSTALLATION.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/INSTALLATION.md b/INSTALLATION.md index 22b9af3bd3..3f94f16bdc 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -14,6 +14,7 @@ This document provides instructions on how to set up and start a running instanc - [Install TypeScript](#install-typescript) - [Install Required Packages](#install-required-packages) - [Installation using Docker](#installation-using-docker) + - [Prerequisites](#prerequisites-1) - [Development Setup](#development-setup) - [Production Setup](#production-setup) - [Configuration](#configuration) @@ -150,6 +151,8 @@ The prerequisites are now installed. The next step will be to get the app up and # Installation using Docker +## Prerequisites + 1. Install Docker on your system: - [Docker Desktop for Windows/Mac](https://www.docker.com/products/docker-desktop) - [Docker Engine for Linux](https://docs.docker.com/engine/install/) From c8c42a4326b7668c160aea61935048c173abe554 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 15 Nov 2024 13:04:24 +0530 Subject: [PATCH 28/68] added recommended changes to INSTALLATION.md --- INSTALLATION.md | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/INSTALLATION.md b/INSTALLATION.md index 3f94f16bdc..c4badf8ec7 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -15,8 +15,7 @@ This document provides instructions on how to set up and start a running instanc - [Install Required Packages](#install-required-packages) - [Installation using Docker](#installation-using-docker) - [Prerequisites](#prerequisites-1) - - [Development Setup](#development-setup) - - [Production Setup](#production-setup) + - [Development Setup](#development-setup) - [Configuration](#configuration) - [Creating .env file](#creating-env-file) - [Setting up PORT in .env file](#setting-up-port-in-env-file) @@ -157,7 +156,7 @@ The prerequisites are now installed. The next step will be to get the app up and - [Docker Desktop for Windows/Mac](https://www.docker.com/products/docker-desktop) - [Docker Engine for Linux](https://docs.docker.com/engine/install/) -## Development Setup +### Development Setup If you prefer to use Docker, you can install the app using the following command: @@ -181,22 +180,6 @@ docker run -p 4321:4321 talawa-admin The application will be accessible at `http://localhost:4321` -## Production Setup - -1. Build the Docker image: - - ```bash - docker build -t talawa-admin . - ``` - -2. Run the container: - ```bash - docker run -p 4321:4321 \ - -e REACT_APP_TALAWA_URL=http://your-api-url:4000/graphql/ \ - -e REACT_APP_BACKEND_WEBSOCKET_URL=ws://your-api-url:4000/graphql/ \ - talawa-admin - ``` - # Configuration It's important to configure Talawa-Admin. Here's how to do it. From d16b95ee179900e8e32a2296f14e948e6caea05b Mon Sep 17 00:00:00 2001 From: Peter Harrison <16875803+palisadoes@users.noreply.github.com> Date: Sat, 16 Nov 2024 15:04:35 -0800 Subject: [PATCH 29/68] Update dependabot.yaml --- .github/dependabot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 9a3e9a54e9..81d68df4bd 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -12,7 +12,7 @@ updates: labels: - "dependencies" # Specify the target branch for PRs - target-branch: "develop" + target-branch: "develop-postgres" # Customize commit message prefix commit-message: prefix: "chore(deps):" From aa1cb0541bf3466c8212676a208ec4a3a12b9bdf Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 17 Nov 2024 10:18:48 +0530 Subject: [PATCH 30/68] updated docker workflow --- .github/workflows/pull-request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3500ddf8ad..bee9bb3722 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -257,6 +257,7 @@ jobs: name: Check if Talawa Admin app starts in Docker runs-on: ubuntu-latest needs: [Code-Quality-Checks, Test-Application] + if: github.actor != 'dependabot' steps: - name: Checkout the Repository uses: actions/checkout@v4 From 97bb5e6c369058f9a50edd86a8f72d837d5dadd4 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 17 Nov 2024 10:32:42 +0530 Subject: [PATCH 31/68] updated INSTALLATION.md --- .github/workflows/pull-request.yml | 2 - INSTALLATION.md | 62 +++++++++++++++++------------- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index bee9bb3722..7eb62357c1 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -267,8 +267,6 @@ jobs: with: driver-opts: | image=moby/buildkit:latest - cache-from: type=gha - cache-to: type=gha,mode=max - name: Build Docker image run: | diff --git a/INSTALLATION.md b/INSTALLATION.md index c4badf8ec7..3c09f69e33 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -16,25 +16,6 @@ This document provides instructions on how to set up and start a running instanc - [Installation using Docker](#installation-using-docker) - [Prerequisites](#prerequisites-1) - [Development Setup](#development-setup) -- [Configuration](#configuration) - - [Creating .env file](#creating-env-file) - - [Setting up PORT in .env file](#setting-up-port-in-env-file) - - [Setting up REACT_APP_TALAWA_URL in .env file](#setting-up-react_app_talawa_url-in-env-file) - - [Setting up REACT_APP_BACKEND_WEBSOCKET_URL in .env file](#setting-up-react_app_backend_websocket_url-in-env-file) - - [Setting up REACT_APP_RECAPTCHA_SITE_KEY in .env file](#setting-up-react_app_recaptcha_site_key-in-env-file) - - [Setting up Compiletime and Runtime logs](#setting-up-compiletime-and-runtime-logs) -- [Post Configuration Steps](#post-configuration-steps) - - [Running Talawa-Admin](#running-talawa-admin) - - [Accessing Talawa-Admin](#accessing-talawa-admin) - - [Talawa-Admin Registration](#talawa-admin-registration) - - [Talawa-Admin Login](#talawa-admin-login) -- [Testing](#testing) - - [Running tests](#running-tests) - - [Debugging tests](#debugging-tests) - - [Linting code files](#linting-code-files) - - [Husky for Git Hooks](#husky-for-git-hooks) - - [pre-commit hook](#pre-commit-hook) - - [post-merge hook](#post-merge-hook) @@ -166,17 +147,17 @@ If you prefer to use Docker, you can install the app using the following command Run the following command to build the Docker image: -``` +````bash docker build -t talawa-admin . -``` +```bash 3. Run the Docker container: After the build is complete, run the Docker container using this command: -``` +```bash docker run -p 4321:4321 talawa-admin -``` +```bash The application will be accessible at `http://localhost:4321` @@ -186,9 +167,9 @@ It's important to configure Talawa-Admin. Here's how to do it. You can use our interactive setup script for the configuration. Use the following command for the same. -``` +```bash npm run setup -``` +```bash All the options in "setup" can be done manually as well and here's how to do it. - [Creating .env file](#creating-env-file) @@ -196,8 +177,10 @@ All the options in "setup" can be done manually as well and here's how to do it. A file named .env is required in the root directory of talawa-admin for storing environment variables used at runtime. It is not a part of the repo and you will have to create it. For a sample of `.env` file there is a file named `.env.example` in the root directory. Create a new `.env` file by copying the contents of the `.env.example` into `.env` file. Use this command: -``` +```` + cp .env.example .env + ``` This `.env` file must be populated with the following environment variables for `talawa-admin` to work: @@ -221,19 +204,25 @@ Add a custom port number for Talawa-Admin development purposes to the variable n Add the endpoint for accessing talawa-api graphql service to the variable named `REACT_APP_TALAWA_URL` in the `.env` file. ``` + REACT_APP_TALAWA_URL="http://API-IP-ADRESS:4000/graphql/" + ``` If you are a software developer working on your local system, then the URL would be: ``` + REACT_APP_TALAWA_URL="http://localhost:4000/graphql/" + ``` If you are trying to access Talawa Admin from a remote host with the API URL containing "localhost", You will have to change the API URL to ``` + REACT_APP_TALAWA_URL="http://YOUR-REMOTE-ADDRESS:4000/graphql/" + ``` ## Setting up REACT_APP_BACKEND_WEBSOCKET_URL in .env file @@ -241,19 +230,25 @@ REACT_APP_TALAWA_URL="http://YOUR-REMOTE-ADDRESS:4000/graphql/" The endpoint for accessing talawa-api WebSocket graphql service for handling subscriptions is automatically added to the variable named `REACT_APP_BACKEND_WEBSOCKET_URL` in the `.env` file. ``` + REACT_APP_BACKEND_WEBSOCKET_URL="ws://API-IP-ADRESS:4000/graphql/" + ``` If you are a software developer working on your local system, then the URL would be: ``` + REACT_APP_BACKEND_WEBSOCKET_URL="ws://localhost:4000/graphql/" + ``` If you are trying to access Talawa Admin from a remote host with the API URL containing "localhost", You will have to change the API URL to ``` + REACT_APP_BACKEND_WEBSOCKET_URL="ws://YOUR-REMOTE-ADDRESS:4000/graphql/" + ``` For additional details, please refer the `How to Access the Talawa-API URL` section in the INSTALLATION.md file found in the [Talawa-API repo](https://github.com/PalisadoesFoundation/talawa-api). @@ -273,7 +268,9 @@ If you want to setup Google reCAPTCHA now, you may refer to the `RECAPTCHA` sect Copy/paste this `reCAPTCHA site key` to the variable named `REACT_APP_RECAPTCHA_SITE_KEY` in `.env` file. ``` + REACT_APP_RECAPTCHA_SITE_KEY="this_is_the_recaptcha_key" + ``` ## Setting up Compiletime and Runtime logs @@ -289,7 +286,9 @@ It's now time to start Talawa-Admin and get it running Run the following command to start `talawa-admin` development server: ``` + npm run serve + ``` ## Accessing Talawa-Admin @@ -297,13 +296,17 @@ npm run serve By default `talawa-admin` runs on port `4321` on your system's localhost. It is available on the following endpoint: ``` + http://localhost:4321/ + ``` If you have specified a custom port number in your `.env` file, Talawa-Admin will run on the following endpoint: ``` + http://localhost:${{customPort}}/ + ``` Replace `${{customPort}}` with the actual custom port number you have configured in your `.env` file. @@ -325,7 +328,9 @@ It is important to test our code. If you are a contributor, please follow these You can run the tests for `talawa-admin` using this command: ``` + npm run test + ``` ## Debugging tests @@ -333,8 +338,10 @@ npm run test You can see the output of failing tests in broswer by running `jest-preview` package before running your tests ``` + npm run jest-preview npm run test + ``` You don't need to re-run the `npm run jest-preview` command each time, simply run the `npm run test` command if the Jest Preview server is already running in the background, it'll automatically detect any failing tests and show the preview at `http://localhost:3336` as shown in this screenshot - @@ -346,7 +353,9 @@ You don't need to re-run the `npm run jest-preview` command each time, simply ru You can lint your code files using this command: ``` + npm run lint:fix + ``` ## Husky for Git Hooks @@ -370,3 +379,4 @@ If you don't want this hook to run, you can manually opt out of this using the ` git pull --no-verify
+``` From 0b47923180d41b1bf41887a7dd501697b084d06c Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 17 Nov 2024 10:44:44 +0530 Subject: [PATCH 32/68] updated INSTALLATION.md --- .github/workflows/pull-request.yml | 6 +++--- INSTALLATION.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 7eb62357c1..7e1dc4f4a8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -286,16 +286,16 @@ jobs: run: | timeout="${HEALTH_CHECK_TIMEOUT:-120}" echo "Starting health check with ${timeout}s timeout" - while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do + while ! nc -z localhost 4321 && [ "$timeout" -gt 0 ]; do sleep 1 timeout=$((timeout-1)) - if [ $((timeout % 10)) -eq 0 ]; then + if [ "$((timeout % 10))" -eq 0 ]; then echo "Still waiting for app to start... ${timeout}s remaining" fi done - if [ $timeout -eq 0 ]; then + if [ "$timeout" -eq 0 ]; then echo "Timeout waiting for application to start" echo "Container logs:" docker logs talawa-admin-app-container diff --git a/INSTALLATION.md b/INSTALLATION.md index 3c09f69e33..56ceb22343 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -149,7 +149,7 @@ Run the following command to build the Docker image: ````bash docker build -t talawa-admin . -```bash + 3. Run the Docker container: @@ -157,7 +157,7 @@ After the build is complete, run the Docker container using this command: ```bash docker run -p 4321:4321 talawa-admin -```bash + The application will be accessible at `http://localhost:4321` @@ -169,7 +169,7 @@ You can use our interactive setup script for the configuration. Use the followin ```bash npm run setup -```bash + All the options in "setup" can be done manually as well and here's how to do it. - [Creating .env file](#creating-env-file) From 31b4bc5c72b1d6a980b69a0a5dac24d2a565a30a Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 17 Nov 2024 11:25:07 +0530 Subject: [PATCH 33/68] updated INSTALLATION.md --- INSTALLATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALLATION.md b/INSTALLATION.md index 56ceb22343..be372c90e4 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -147,7 +147,7 @@ If you prefer to use Docker, you can install the app using the following command Run the following command to build the Docker image: -````bash +```bash docker build -t talawa-admin . From c0884d10739b6425486f6193178cb954858a3717 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 18 Nov 2024 01:32:24 +0530 Subject: [PATCH 34/68] updated setup.ts --- setup.ts | 195 ++++++++++++++++++++----------------------------------- 1 file changed, 71 insertions(+), 124 deletions(-) diff --git a/setup.ts b/setup.ts index 2a6c437fa3..da0044c036 100644 --- a/setup.ts +++ b/setup.ts @@ -7,9 +7,18 @@ import { checkEnvFile } from './src/setup/checkEnvFile/checkEnvFile'; import { validateRecaptcha } from './src/setup/validateRecaptcha/validateRecaptcha'; import { askForCustomPort } from './src/setup/askForCustomPort/askForCustomPort'; -export async function main(): Promise { - console.log('Welcome to the Talawa Admin setup! 🚀'); +// Update the .env file with new values +const updateEnvFile = (key: string, value: string): void => { + const currentEnvContent = fs.readFileSync('.env', 'utf8'); + const updatedEnvContent = currentEnvContent.replace( + new RegExp(`^${key}=.*$`, 'm'), + `${key}=${value}`, + ); + fs.writeFileSync('.env', updatedEnvContent, 'utf8'); +}; +// Handle .env file creation or validation +const handleEnvFile = (): void => { if (!fs.existsSync('.env')) { fs.openSync('.env', 'w'); const config = dotenv.parse(fs.readFileSync('.env.example')); @@ -19,147 +28,78 @@ export async function main(): Promise { } else { checkEnvFile(); } +}; - let shouldSetCustomPort: boolean; - - if (process.env.PORT) { - console.log( - `\nCustom port for development server already exists with the value:\n${process.env.PORT}`, - ); - shouldSetCustomPort = true; - } else { - const { shouldSetCustomPortResponse } = await inquirer.prompt({ - type: 'confirm', - name: 'shouldSetCustomPortResponse', - message: 'Would you like to set up a custom port?', - default: true, - }); - shouldSetCustomPort = shouldSetCustomPortResponse; - } +// Ask and update the custom port +const askAndUpdatePort = async (): Promise => { + const { shouldSetCustomPortResponse } = await inquirer.prompt({ + type: 'confirm', + name: 'shouldSetCustomPortResponse', + message: 'Would you like to set up a custom port?', + default: true, + }); - if (shouldSetCustomPort) { + if (shouldSetCustomPortResponse) { const customPort = await askForCustomPort(); - - const port = dotenv.parse(fs.readFileSync('.env')).PORT; - - fs.readFile('.env', 'utf8', (err, data) => { - const result = data.replace(`PORT=${port}`, `PORT=${customPort}`); - fs.writeFileSync('.env', result, 'utf8'); - }); + updateEnvFile('PORT', String(customPort)); } +}; - let shouldSetTalawaApiUrl: boolean; - - if (process.env.REACT_APP_TALAWA_URL) { - console.log( - `\nEndpoint for accessing talawa-api graphql service already exists with the value:\n${process.env.REACT_APP_TALAWA_URL}`, - ); - shouldSetTalawaApiUrl = true; - } else { - const { shouldSetTalawaApiUrlResponse } = await inquirer.prompt({ - type: 'confirm', - name: 'shouldSetTalawaApiUrlResponse', - message: 'Would you like to set up talawa-api endpoint?', - default: true, - }); - shouldSetTalawaApiUrl = shouldSetTalawaApiUrlResponse; - } +// Ask and update the Talawa API URL +const askAndUpdateTalawaApiUrl = async (): Promise => { + const { shouldSetTalawaApiUrlResponse } = await inquirer.prompt({ + type: 'confirm', + name: 'shouldSetTalawaApiUrlResponse', + message: 'Would you like to set up Talawa API endpoint?', + default: true, + }); - if (shouldSetTalawaApiUrl) { - let isConnected = false, - endpoint = ''; + if (shouldSetTalawaApiUrlResponse) { + let endpoint = ' '; + let isConnected = false; while (!isConnected) { endpoint = await askForTalawaApiUrl(); const url = new URL(endpoint); isConnected = await checkConnection(url.origin); } - const envPath = '.env'; - const currentEnvContent = fs.readFileSync(envPath, 'utf8'); - const talawaApiUrl = dotenv.parse(currentEnvContent).REACT_APP_TALAWA_URL; - const updatedEnvContent = currentEnvContent.replace( - `REACT_APP_TALAWA_URL=${talawaApiUrl}`, - `REACT_APP_TALAWA_URL=${endpoint}`, - ); - - fs.writeFileSync(envPath, updatedEnvContent, 'utf8'); + updateEnvFile('REACT_APP_TALAWA_URL', endpoint); const websocketUrl = endpoint.replace(/^http(s)?:\/\//, 'ws$1://'); - const currentWebSocketUrl = - dotenv.parse(updatedEnvContent).REACT_APP_BACKEND_WEBSOCKET_URL; - - const finalEnvContent = updatedEnvContent.replace( - `REACT_APP_BACKEND_WEBSOCKET_URL=${currentWebSocketUrl}`, - `REACT_APP_BACKEND_WEBSOCKET_URL=${websocketUrl}`, - ); - - fs.writeFileSync(envPath, finalEnvContent, 'utf8'); + updateEnvFile('REACT_APP_BACKEND_WEBSOCKET_URL', websocketUrl); } +}; +// Ask and set up reCAPTCHA +const askAndSetRecaptcha = async (): Promise => { const { shouldUseRecaptcha } = await inquirer.prompt({ type: 'confirm', name: 'shouldUseRecaptcha', - message: 'Would you like to set up ReCAPTCHA?', + message: 'Would you like to set up reCAPTCHA?', default: true, }); if (shouldUseRecaptcha) { - const useRecaptcha = dotenv.parse( - fs.readFileSync('.env'), - ).REACT_APP_USE_RECAPTCHA; - - fs.readFile('.env', 'utf8', (err, data) => { - const result = data.replace( - `REACT_APP_USE_RECAPTCHA=${useRecaptcha}`, - `REACT_APP_USE_RECAPTCHA=yes`, - ); - fs.writeFileSync('.env', result, 'utf8'); - }); - let shouldSetRecaptchaSiteKey: boolean; - if (process.env.REACT_APP_RECAPTCHA_SITE_KEY) { - console.log( - `\nreCAPTCHA site key already exists with the value ${process.env.REACT_APP_RECAPTCHA_SITE_KEY}`, - ); - shouldSetRecaptchaSiteKey = true; - } else { - const { shouldSetRecaptchaSiteKeyResponse } = await inquirer.prompt({ - type: 'confirm', - name: 'shouldSetRecaptchaSiteKeyResponse', - message: 'Would you like to set up a reCAPTCHA site key?', - default: true, - }); - shouldSetRecaptchaSiteKey = shouldSetRecaptchaSiteKeyResponse; - } - - if (shouldSetRecaptchaSiteKey) { - const { recaptchaSiteKeyInput } = await inquirer.prompt([ - { - type: 'input', - name: 'recaptchaSiteKeyInput', - message: 'Enter your reCAPTCHA site key:', - validate: async (input: string): Promise => { - if (validateRecaptcha(input)) { - return true; - } - return 'Invalid reCAPTCHA site key. Please try again.'; - }, + const { recaptchaSiteKeyInput } = await inquirer.prompt([ + { + type: 'input', + name: 'recaptchaSiteKeyInput', + message: 'Enter your reCAPTCHA site key:', + validate: (input: string): boolean | string => { + return ( + validateRecaptcha(input) || + 'Invalid reCAPTCHA site key. Please try again.' + ); }, - ]); - - const recaptchaSiteKey = dotenv.parse( - fs.readFileSync('.env'), - ).REACT_APP_RECAPTCHA_SITE_KEY; - - fs.readFile('.env', 'utf8', (err, data) => { - const result = data.replace( - `REACT_APP_RECAPTCHA_SITE_KEY=${recaptchaSiteKey}`, - `REACT_APP_RECAPTCHA_SITE_KEY=${recaptchaSiteKeyInput}`, - ); - fs.writeFileSync('.env', result, 'utf8'); - }); - } + }, + ]); + + updateEnvFile('REACT_APP_RECAPTCHA_SITE_KEY', recaptchaSiteKeyInput); } +}; +// Ask and set up logging errors in the console +const askAndSetLogErrors = async (): Promise => { const { shouldLogErrors } = await inquirer.prompt({ type: 'confirm', name: 'shouldLogErrors', @@ -169,16 +109,23 @@ export async function main(): Promise { }); if (shouldLogErrors) { - const logErrors = dotenv.parse(fs.readFileSync('.env')).ALLOW_LOGS; - - fs.readFile('.env', 'utf8', (err, data) => { - const result = data.replace(`ALLOW_LOGS=${logErrors}`, 'ALLOW_LOGS=YES'); - fs.writeFileSync('.env', result, 'utf8'); - }); + updateEnvFile('ALLOW_LOGS', 'YES'); } +}; + +// Main function to run the setup process +export async function main(): Promise { + console.log('Welcome to the Talawa Admin setup! 🚀'); + + handleEnvFile(); + + await askAndUpdatePort(); + await askAndUpdateTalawaApiUrl(); + await askAndSetRecaptcha(); + await askAndSetLogErrors(); console.log( - '\nCongratulations! Talawa Admin has been successfully setup! 🥂🎉', + '\nCongratulations! Talawa Admin has been successfully set up! 🥂🎉', ); } From eac28f7a31ba3ba7e09add90288f804ec7e4052b Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 18 Nov 2024 02:09:22 +0530 Subject: [PATCH 35/68] did recommended changes to setup.ts --- setup.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/setup.ts b/setup.ts index da0044c036..7ee0655af2 100644 --- a/setup.ts +++ b/setup.ts @@ -10,11 +10,16 @@ import { askForCustomPort } from './src/setup/askForCustomPort/askForCustomPort' // Update the .env file with new values const updateEnvFile = (key: string, value: string): void => { const currentEnvContent = fs.readFileSync('.env', 'utf8'); - const updatedEnvContent = currentEnvContent.replace( - new RegExp(`^${key}=.*$`, 'm'), - `${key}=${value}`, - ); - fs.writeFileSync('.env', updatedEnvContent, 'utf8'); + const keyRegex = new RegExp(`^${key}=.*$`, 'm'); + if (keyRegex.test(currentEnvContent)) { + const updatedEnvContent = currentEnvContent.replace( + keyRegex, + `${key}=${value}`, + ); + fs.writeFileSync('.env', updatedEnvContent, 'utf8'); + } else { + fs.appendFileSync('.env', `\n${key}=${value}`, 'utf8'); + } }; // Handle .env file creation or validation From 15282bc33ff1587d701c36d55ab0c2835c9d33d6 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 18 Nov 2024 10:13:01 +0530 Subject: [PATCH 36/68] updated setup.ts --- setup.ts | 71 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 10 deletions(-) diff --git a/setup.ts b/setup.ts index 7ee0655af2..5fdfe6f49f 100644 --- a/setup.ts +++ b/setup.ts @@ -46,10 +46,42 @@ const askAndUpdatePort = async (): Promise => { if (shouldSetCustomPortResponse) { const customPort = await askForCustomPort(); + if (customPort < 1024 || customPort > 65535) { + throw new Error('Port must be between 1024 and 65535'); + } + updateEnvFile('PORT', String(customPort)); } }; +const askAndSetDockerOption = async (): Promise => { + const { useDocker } = await inquirer.prompt({ + type: 'confirm', + name: 'useDocker', + message: 'Would you like to set up with Docker?', + default: false, + }); + + if (useDocker) { + console.log('Setting up with Docker...'); + updateEnvFile('USE_DOCKER', 'YES'); + const dockerUrl = process.env.REACT_APP_TALAWA_URL?.replace( + 'localhost', + 'host.docker.internal', + ); + if (dockerUrl) { + updateEnvFile('REACT_APP_DOCKER_TALAWA_URL', dockerUrl); + } else { + console.warn( + '⚠️ Docker URL setup skipped as no Talawa API URL was provided.', + ); + } + } else { + console.log('Setting up without Docker...'); + updateEnvFile('USE_DOCKER', 'NO'); + } +}; + // Ask and update the Talawa API URL const askAndUpdateTalawaApiUrl = async (): Promise => { const { shouldSetTalawaApiUrlResponse } = await inquirer.prompt({ @@ -60,18 +92,30 @@ const askAndUpdateTalawaApiUrl = async (): Promise => { }); if (shouldSetTalawaApiUrlResponse) { - let endpoint = ' '; + let endpoint = ''; let isConnected = false; while (!isConnected) { endpoint = await askForTalawaApiUrl(); const url = new URL(endpoint); + if (!['http:', 'https:'].includes(url.protocol)) { + throw new Error('Invalid URL protocol.Must be http or https'); + } isConnected = await checkConnection(url.origin); } updateEnvFile('REACT_APP_TALAWA_URL', endpoint); const websocketUrl = endpoint.replace(/^http(s)?:\/\//, 'ws$1://'); + try { + new URL(websocketUrl); + } catch { + throw new Error('Invalid WebSocket URL generated'); + } updateEnvFile('REACT_APP_BACKEND_WEBSOCKET_URL', websocketUrl); + if (endpoint.includes('localhost')) { + const dockerUrl = endpoint.replace('localhost', 'host.docker.internal'); + updateEnvFile('REACT_APP_DOCKER_TALAWA_URL', dockerUrl); + } } }; @@ -120,18 +164,25 @@ const askAndSetLogErrors = async (): Promise => { // Main function to run the setup process export async function main(): Promise { - console.log('Welcome to the Talawa Admin setup! 🚀'); + try { + console.log('Welcome to the Talawa Admin setup! 🚀'); - handleEnvFile(); + handleEnvFile(); - await askAndUpdatePort(); - await askAndUpdateTalawaApiUrl(); - await askAndSetRecaptcha(); - await askAndSetLogErrors(); + await askAndSetDockerOption(); + await askAndUpdatePort(); + await askAndUpdateTalawaApiUrl(); + await askAndSetRecaptcha(); + await askAndSetLogErrors(); - console.log( - '\nCongratulations! Talawa Admin has been successfully set up! 🥂🎉', - ); + console.log( + '\nCongratulations! Talawa Admin has been successfully set up! 🥂🎉', + ); + } catch (error) { + console.error('\n❌ Setup failed:', error); + console.log('\nPlease try again or contact support if the issue persists.'); + process.exit(1); + } } main(); From 5830ec7b721cf2f7dcec79c2d284b6e4cd559c75 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 18 Nov 2024 11:12:19 +0530 Subject: [PATCH 37/68] updated INSTALLATION.md --- Dockerfile | 2 +- INSTALLATION.md | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6b13a712b7..a045df6f11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.10.0 AS build +FROM node:20.10.0-alpine AS build WORKDIR /usr/src/app diff --git a/INSTALLATION.md b/INSTALLATION.md index b5039fb282..1ed713567e 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -155,12 +155,32 @@ docker build -t talawa-admin . After the build is complete, run the Docker container using this command: +For Linux/MacOS ```bash -docker run -p 4321:4321 talawa-admin +docker run -d \ + --name talawa-admin \ + -p 4321:4321 \ + -v $(pwd)/.env:/app/.env \ + talawa-admin + ```bash +For Windows +docker run -d ` + --name talawa-admin ` + -p 4321:4321 ` + -v ${PWD}\.env:/app/.env ` + talawa-admin + + The application will be accessible at `http://localhost:4321` +4. Managing the container: + +To stop the container: +```bash +docker stop talawa-admin + # Configuration It's important to configure Talawa-Admin. Here's how to do it. @@ -379,4 +399,4 @@ If you don't want this hook to run, you can manually opt out of this using the ` git pull --no-verify
-``` \ No newline at end of file +``` From f9d03de8e400b44ec438f6d12353c6f4d5f95e7c Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 24 Nov 2024 10:31:23 +0530 Subject: [PATCH 38/68] pull-request.yml formatted --- .github/workflows/pull-request.yml | 81 +----------------------------- 1 file changed, 1 insertion(+), 80 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index dec1e234fa..8836d93c89 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -260,85 +260,6 @@ jobs: - name: Validate Documents run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql' - Start-App-Without-Docker: - name: Check if Talawa Admin app starts (No Docker) - runs-on: ubuntu-latest - needs: [Code-Quality-Checks, Test-Application] - if: github.actor != 'dependabot' - steps: - - name: Checkout the Repository - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - - name: Install Dependencies - run: npm install - - - name: Build Production App - run: npm run build - - - name: Start Production App - run: | - npm run preview & - echo $! > .pidfile_prod - - - name: Check if Production App is running - run: | - timeout=120 - echo "Starting production health check with ${timeout}s timeout" - while ! nc -z localhost 4173 && [ $timeout -gt 0 ]; do - sleep 1 - timeout=$((timeout-1)) - if [ $((timeout % 10)) -eq 0 ]; then - echo "Still waiting for production app to start... ${timeout}s remaining" - fi - done - - if [ $timeout -eq 0 ]; then - echo "Timeout waiting for production application to start" - exit 1 - fi - echo "Production app started successfully" - - - name: Stop Production App - run: | - if [ -f .pidfile_prod ]; then - kill "$(cat .pidfile_prod)" - fi - - - name: Start Development App - run: | - npm run serve & - echo $! > .pidfile_dev - - - name: Check if Development App is running - run: | - timeout=120 - echo "Starting development health check with ${timeout}s timeout" - while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do - sleep 1 - timeout=$((timeout-1)) - if [ $((timeout % 10)) -eq 0 ]; then - echo "Still waiting for development app to start... ${timeout}s remaining" - fi - done - - if [ $timeout -eq 0 ]; then - echo "Timeout waiting for development application to start" - exit 1 - fi - echo "Development app started successfully" - - - name: Stop Development App - if: always() - run: | - if [ -f .pidfile_dev ]; then - kill "$(cat .pidfile_dev)" - fi - Docker-Start-Check: name: Check if Talawa Admin app starts in Docker runs-on: ubuntu-latest @@ -404,4 +325,4 @@ jobs: if: github.event.pull_request.base.ref != 'develop-postgres' run: | echo "Error: Pull request target branch must be 'develop-postgres'. Please refer PR_GUIDELINES.md" - exit 1 \ No newline at end of file + exit 1 From 62436595cd91b1e1847e14565283987182d171c7 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 24 Nov 2024 10:42:34 +0530 Subject: [PATCH 39/68] solved the problem with linting of dockerfile in pull-request.yml file --- .eslintignore | 5 ++++- .github/workflows/pull-request.yml | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.eslintignore b/.eslintignore index 7e45de312a..451c33d0fc 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,5 @@ # Contains the PDF file of the Tag as JSON string, thus does not need to be linted -src/components/CheckIn/tagTemplate.ts \ No newline at end of file + +src/components/CheckIn/tagTemplate.ts +Dockerfile +\*.md diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8836d93c89..27389e97a9 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -59,7 +59,13 @@ jobs: if: steps.changed-files.outputs.only_changed != 'true' env: CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} - run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py + run: | + CHANGED_JS_TS_FILES=$(echo "${CHANGED_FILES}" | grep -E '\.(js|jsx|ts|tsx)$') + if [ -n "$CHANGED_JS_TS_FILES" ]; then + npx eslint --ext .js,.jsx,.ts,.tsx ${CHANGED_JS_TS_FILES} && python .github/workflows/eslint_disable_check.py + else + echo "No JavaScript/TypeScript files to lint." + fi - name: Check for TSDoc comments run: npm run check-tsdoc # Run the TSDoc check script From 4c539cb8c817b170b2906d50875b690d57997d4f Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 24 Nov 2024 10:51:17 +0530 Subject: [PATCH 40/68] solved the problem with linting of dockerfile in pull-request.yml file --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 27389e97a9..ce6038d570 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -62,7 +62,7 @@ jobs: run: | CHANGED_JS_TS_FILES=$(echo "${CHANGED_FILES}" | grep -E '\.(js|jsx|ts|tsx)$') if [ -n "$CHANGED_JS_TS_FILES" ]; then - npx eslint --ext .js,.jsx,.ts,.tsx ${CHANGED_JS_TS_FILES} && python .github/workflows/eslint_disable_check.py + npx eslint --ext .js,.jsx,.ts,.tsx ${CHANGED_JS_TS_FILES} && python .github/workflows/eslint_disable_check.py else echo "No JavaScript/TypeScript files to lint." fi From 39115fb849935ed0342b36205b58d8b96949363b Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 24 Nov 2024 10:54:46 +0530 Subject: [PATCH 41/68] solved the problem with linting of dockerfile in pull-request.yml file --- .github/workflows/pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index ce6038d570..42ce6bd552 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -60,11 +60,11 @@ jobs: env: CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | - CHANGED_JS_TS_FILES=$(echo "${CHANGED_FILES}" | grep -E '\.(js|jsx|ts|tsx)$') + CHANGED_JS_TS_FILES=$(echo "${CHANGED_FILES}" | grep -E '\.(js|jsx|ts|tsx)$' || true) if [ -n "$CHANGED_JS_TS_FILES" ]; then npx eslint --ext .js,.jsx,.ts,.tsx ${CHANGED_JS_TS_FILES} && python .github/workflows/eslint_disable_check.py else - echo "No JavaScript/TypeScript files to lint." + echo "No JavaScript/TypeScript files to lint." fi - name: Check for TSDoc comments From 3192d45d6122c74333bccb5bf90a50a89e5110a3 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 24 Nov 2024 14:53:36 +0530 Subject: [PATCH 42/68] made recommended changes to pull-request.yml --- .github/workflows/pull-request.yml | 2 +- jest.config.js | 4 ++-- scripts/githooks/check-localstorage-usage.js | 4 ++-- scripts/githooks/update-toc.js | 1 - src/components/AddOn/AddOn.tsx | 4 +--- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 42ce6bd552..2ad78b6b2a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -62,7 +62,7 @@ jobs: run: | CHANGED_JS_TS_FILES=$(echo "${CHANGED_FILES}" | grep -E '\.(js|jsx|ts|tsx)$' || true) if [ -n "$CHANGED_JS_TS_FILES" ]; then - npx eslint --ext .js,.jsx,.ts,.tsx ${CHANGED_JS_TS_FILES} && python .github/workflows/eslint_disable_check.py + npx eslint --ext .js,.jsx,.ts,.tsx "${CHANGED_JS_TS_FILES}" && python .github/workflows/eslint_disable_check.py else echo "No JavaScript/TypeScript files to lint." fi diff --git a/jest.config.js b/jest.config.js index bd17983c75..314a6b4a70 100644 --- a/jest.config.js +++ b/jest.config.js @@ -30,8 +30,8 @@ export default { '^@dicebear/collection$': '/scripts/__mocks__/@dicebear/collection.ts', '\\.svg\\?react$': '/scripts/__mocks__/fileMock.js', - '\\.svg$': '/scripts/__mocks__/fileMock.js', - '^@pdfme/generator$': '/scripts/__mocks__/@pdfme/generator.ts' + '\\.svg$': '/scripts/__mocks__/fileMock.js', + '^@pdfme/generator$': '/scripts/__mocks__/@pdfme/generator.ts', }, moduleFileExtensions: [ 'web.js', diff --git a/scripts/githooks/check-localstorage-usage.js b/scripts/githooks/check-localstorage-usage.js index 0a811df307..0a7e2adbfc 100755 --- a/scripts/githooks/check-localstorage-usage.js +++ b/scripts/githooks/check-localstorage-usage.js @@ -86,10 +86,10 @@ if (filesWithLocalStorage.length > 0) { console.info( '\x1b[34m%s\x1b[0m', - '\nInfo: Consider using custom hook functions.' + '\nInfo: Consider using custom hook functions.', ); console.info( - 'Please use the getItem, setItem, and removeItem functions provided by the custom hook useLocalStorage.\n' + 'Please use the getItem, setItem, and removeItem functions provided by the custom hook useLocalStorage.\n', ); process.exit(1); diff --git a/scripts/githooks/update-toc.js b/scripts/githooks/update-toc.js index 268becfd13..2b4e4f9b83 100644 --- a/scripts/githooks/update-toc.js +++ b/scripts/githooks/update-toc.js @@ -8,7 +8,6 @@ const markdownFiles = fs markdownFiles.forEach((file) => { const command = `markdown-toc -i "${file}" --bullets "-"`; execSync(command, { stdio: 'inherit' }); - }); console.log('Table of contents updated successfully.'); diff --git a/src/components/AddOn/AddOn.tsx b/src/components/AddOn/AddOn.tsx index 850cc05ee4..29a585f301 100644 --- a/src/components/AddOn/AddOn.tsx +++ b/src/components/AddOn/AddOn.tsx @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; interface InterfaceAddOnProps { - extras?: any; + extras?: string; name?: string; children?: React.ReactNode; } @@ -21,8 +21,6 @@ interface InterfaceAddOnProps { */ function AddOn({ children = 'Default text', - extras = {}, - name = '', }: InterfaceAddOnProps): JSX.Element { return (
From 5cd5a488b69903ccf9e13d8eb751928f10815030 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 24 Nov 2024 15:09:50 +0530 Subject: [PATCH 43/68] testing eslint fix --- .eslintignore | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.eslintignore b/.eslintignore index 451c33d0fc..1b2a7f0c82 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,24 @@ # Contains the PDF file of the Tag as JSON string, thus does not need to be linted src/components/CheckIn/tagTemplate.ts + +node_modules/ + +dist/ +build/ + +tests/ + +\*.log + +.eslintignore +.eslintrc.js +jest.config.js +tsconfig.json + +\*.swp +.vscode/ + Dockerfile -\*.md +.dockerignore +.git/ From da0113c6815dc0804988a5688845df03258bffef Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 24 Nov 2024 15:39:02 +0530 Subject: [PATCH 44/68] testing eslint --- .github/workflows/pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 2ad78b6b2a..850983abb5 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -62,7 +62,8 @@ jobs: run: | CHANGED_JS_TS_FILES=$(echo "${CHANGED_FILES}" | grep -E '\.(js|jsx|ts|tsx)$' || true) if [ -n "$CHANGED_JS_TS_FILES" ]; then - npx eslint --ext .js,.jsx,.ts,.tsx "${CHANGED_JS_TS_FILES}" && python .github/workflows/eslint_disable_check.py + echo "Running ESLint on changed files: $CHANGED_JS_TS_FILES" + npx eslint $CHANGED_JS_TS_FILES --fix else echo "No JavaScript/TypeScript files to lint." fi From de5cb434f5b4fe3ed91a0e5802647ab4b16d6f15 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Sun, 24 Nov 2024 15:45:16 +0530 Subject: [PATCH 45/68] testing eslint --- .github/workflows/pull-request.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 850983abb5..2ad78b6b2a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -62,8 +62,7 @@ jobs: run: | CHANGED_JS_TS_FILES=$(echo "${CHANGED_FILES}" | grep -E '\.(js|jsx|ts|tsx)$' || true) if [ -n "$CHANGED_JS_TS_FILES" ]; then - echo "Running ESLint on changed files: $CHANGED_JS_TS_FILES" - npx eslint $CHANGED_JS_TS_FILES --fix + npx eslint --ext .js,.jsx,.ts,.tsx "${CHANGED_JS_TS_FILES}" && python .github/workflows/eslint_disable_check.py else echo "No JavaScript/TypeScript files to lint." fi From 2b4f3a082b1368f84082634079f70d5fef5142e8 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 25 Nov 2024 22:17:06 +0530 Subject: [PATCH 46/68] added askForDocker file with test file --- Dockerfile | 34 ++++--- setup.ts | 107 +++++++++++++++++--- src/setup/askForDocker/askForDocker.test.ts | 72 +++++++++++++ src/setup/askForDocker/askForDocker.ts | 30 ++++++ 4 files changed, 216 insertions(+), 27 deletions(-) create mode 100644 src/setup/askForDocker/askForDocker.test.ts create mode 100644 src/setup/askForDocker/askForDocker.ts diff --git a/Dockerfile b/Dockerfile index a045df6f11..0e40aacc63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,21 @@ -FROM node:20.10.0-alpine AS build -WORKDIR /usr/src/app - -COPY package*.json ./ - -RUN npm install - -COPY . . - -RUN npm run build - -EXPOSE 4321 - -CMD ["npm", "run", "serve"] \ No newline at end of file + # Stage 1: Build + FROM node:20.10.0-alpine AS build + + # Set working directory + WORKDIR /usr/src/app + + # Copy package files and install dependencies + COPY package*.json ./ + RUN npm install + + # Copy source code and build + COPY . . + RUN npm run build + + # Expose the specified port + EXPOSE 4321 + + # Start the application + CMD ["npm", "run", "serve"] + \ No newline at end of file diff --git a/setup.ts b/setup.ts index 5fdfe6f49f..cfda67ae85 100644 --- a/setup.ts +++ b/setup.ts @@ -6,6 +6,7 @@ import { askForTalawaApiUrl } from './src/setup/askForTalawaApiUrl/askForTalawaA import { checkEnvFile } from './src/setup/checkEnvFile/checkEnvFile'; import { validateRecaptcha } from './src/setup/validateRecaptcha/validateRecaptcha'; import { askForCustomPort } from './src/setup/askForCustomPort/askForCustomPort'; +import { askForDocker } from 'setup/askForDocker/askForDocker'; // Update the .env file with new values const updateEnvFile = (key: string, value: string): void => { @@ -21,6 +22,28 @@ const updateEnvFile = (key: string, value: string): void => { fs.appendFileSync('.env', `\n${key}=${value}`, 'utf8'); } }; +// Function to update the docker environment file +const updateDockerEnvFile = (key: string, value: string): void => { + const envFilePath = './.env'; + + let envContent = ''; + if (fs.existsSync(envFilePath)) { + envContent = fs.readFileSync(envFilePath, 'utf-8'); + } + + const lines = envContent.split('\n').filter(Boolean); + const updatedContent = lines.map((line) => + line.startsWith(`${key}=`) ? `${key}=${value}` : line, + ); + + // Add the key if it doesn't exist + if (!lines.some((line) => line.startsWith(`${key}=`))) { + updatedContent.push(`${key}=${value}`); + } + + fs.writeFileSync(envFilePath, updatedContent.join('\n')); + console.log(`Updated .env file: ${key}=${value}`); +}; // Handle .env file creation or validation const handleEnvFile = (): void => { @@ -40,7 +63,8 @@ const askAndUpdatePort = async (): Promise => { const { shouldSetCustomPortResponse } = await inquirer.prompt({ type: 'confirm', name: 'shouldSetCustomPortResponse', - message: 'Would you like to set up a custom port?', + message: + 'Would you like to set up a custom port for running talawa-admin without docker ?', default: true, }); @@ -50,10 +74,39 @@ const askAndUpdatePort = async (): Promise => { throw new Error('Port must be between 1024 and 65535'); } - updateEnvFile('PORT', String(customPort)); + updateDockerEnvFile('PORT', String(customPort)); } }; +// Generate Docker file +const generateDockerfile = (port: string): void => { + const dockerfileContent = ` + # Stage 1: Build + FROM node:20.10.0-alpine AS build + + # Set working directory + WORKDIR /usr/src/app + + # Copy package files and install dependencies + COPY package*.json ./ + RUN npm install + + # Copy source code and build + COPY . . + RUN npm run build + + # Expose the specified port + EXPOSE ${port} + + # Start the application + CMD ["npm", "run", "serve"] + `; + + fs.writeFileSync('Dockerfile', dockerfileContent); + console.log(`Dockerfile generated successfully with port ${port}! 🚀`); +}; + +// Function to manage Docker setup const askAndSetDockerOption = async (): Promise => { const { useDocker } = await inquirer.prompt({ type: 'confirm', @@ -64,21 +117,49 @@ const askAndSetDockerOption = async (): Promise => { if (useDocker) { console.log('Setting up with Docker...'); - updateEnvFile('USE_DOCKER', 'YES'); - const dockerUrl = process.env.REACT_APP_TALAWA_URL?.replace( - 'localhost', - 'host.docker.internal', - ); - if (dockerUrl) { - updateEnvFile('REACT_APP_DOCKER_TALAWA_URL', dockerUrl); - } else { - console.warn( - '⚠️ Docker URL setup skipped as no Talawa API URL was provided.', + updateDockerEnvFile('USE_DOCKER', 'YES'); + + const dockerConfig = await askForDocker(); // Prompt for Docker configuration + + // Ensure Docker config is valid + if (dockerConfig.dockerAppPort && dockerConfig.containerName) { + generateDockerfile(dockerConfig.dockerAppPort); + + const defaultPort = dockerConfig.dockerAppPort; + const containerName = dockerConfig.containerName; + + console.log(` + ✨ **Next Steps**: + 1. To build the Docker image, use: + \`docker build -t ${containerName} .\` + + 2. The default Docker application port is **${defaultPort}**. You can run the container with this default port using: + \`docker run -d -p ${defaultPort}:${defaultPort} ${containerName}\` + + 3. To use a custom port (e.g., 5000), you can override the default port by running: + \`docker run -d -p 5000:${defaultPort} ${containerName}\` + + 4. If you don’t specify a custom port, the default exposed port (4321) will be used. + `); + + const dockerUrl = process.env.REACT_APP_TALAWA_URL?.replace( + 'localhost', + 'host.docker.internal', ); + + if (dockerUrl) { + updateDockerEnvFile('REACT_APP_DOCKER_TALAWA_URL', dockerUrl); + } else { + console.warn( + '⚠️ Docker URL setup skipped as no Talawa API URL was provided.', + ); + } + } else { + console.warn('⚠️ Docker setup incomplete due to missing configuration.'); } } else { console.log('Setting up without Docker...'); - updateEnvFile('USE_DOCKER', 'NO'); + updateDockerEnvFile('USE_DOCKER', 'NO'); } }; diff --git a/src/setup/askForDocker/askForDocker.test.ts b/src/setup/askForDocker/askForDocker.test.ts new file mode 100644 index 0000000000..62f04fb574 --- /dev/null +++ b/src/setup/askForDocker/askForDocker.test.ts @@ -0,0 +1,72 @@ +import inquirer from 'inquirer'; +import { askForDocker } from './askForDocker'; // Adjust the import path if necessary + +jest.mock('inquirer'); + +describe('askForDocker', () => { + test('should return default docker port if user provides no input for dockerAppPort', async () => { + jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ + useDocker: true, + dockerAppPort: '4321', + containerName: 'talawa-admin', + }); + + const result = await askForDocker(); + expect(result.dockerAppPort).toBe('4321'); + }); + + test('should return user-provided docker port', async () => { + jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ + useDocker: true, + dockerAppPort: '8080', + containerName: 'talawa-admin', + }); + + const result = await askForDocker(); + expect(result.dockerAppPort).toBe('8080'); + }); + + test('should return default container name if user provides no input', async () => { + jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ + useDocker: true, + dockerAppPort: '4321', + containerName: 'talawa-admin', + }); + + const result = await askForDocker(); + expect(result.containerName).toBe('talawa-admin'); + }); + + test('should return user-provided container name', async () => { + jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ + useDocker: true, + dockerAppPort: '4321', + containerName: 'my-docker-container', + }); + + const result = await askForDocker(); + expect(result.containerName).toBe('my-docker-container'); + }); + + test('should default to useDocker = true', async () => { + jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ + useDocker: true, + dockerAppPort: '4321', + containerName: 'talawa-admin', + }); + + const result = await askForDocker(); + expect(result.useDocker).toBe(true); + }); + + test('should return false for useDocker if user selects "no"', async () => { + jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ + useDocker: false, + dockerAppPort: '4321', + containerName: 'talawa-admin', + }); + + const result = await askForDocker(); + expect(result.useDocker).toBe(false); + }); +}); diff --git a/src/setup/askForDocker/askForDocker.ts b/src/setup/askForDocker/askForDocker.ts new file mode 100644 index 0000000000..9c0afee25a --- /dev/null +++ b/src/setup/askForDocker/askForDocker.ts @@ -0,0 +1,30 @@ +import inquirer from 'inquirer'; + +export const askForDocker = async (): Promise<{ + useDocker: boolean; + dockerAppPort: string; + containerName: string; +}> => { + const answers = await inquirer.prompt([ + { + type: 'confirm', + name: 'useDocker', + message: 'Do you want to use Docker for this project?', + default: true, + }, + { + type: 'input', + name: 'dockerAppPort', + message: 'Enter the port to expose Docker (default: 4321):', + default: 4321, + }, + { + type: 'input', + name: 'containerName', + message: 'Enter the name for the Docker container:', + default: 'talawa-admin', + }, + ]); + + return answers; +}; From af8cd4add960daca2af17434687a58760c6be861 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Thu, 28 Nov 2024 20:50:36 +0530 Subject: [PATCH 47/68] updated setup.ts file --- Dockerfile | 2 +- setup.ts | 126 +++++--------------- src/setup/askForDocker/askForDocker.test.ts | 72 ++--------- src/setup/askForDocker/askForDocker.ts | 20 +--- 4 files changed, 44 insertions(+), 176 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0e40aacc63..c64ba7e216 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN npm run build # Expose the specified port - EXPOSE 4321 + EXPOSE 5000 # Start the application CMD ["npm", "run", "serve"] diff --git a/setup.ts b/setup.ts index cfda67ae85..63a4f80e6d 100644 --- a/setup.ts +++ b/setup.ts @@ -22,28 +22,6 @@ const updateEnvFile = (key: string, value: string): void => { fs.appendFileSync('.env', `\n${key}=${value}`, 'utf8'); } }; -// Function to update the docker environment file -const updateDockerEnvFile = (key: string, value: string): void => { - const envFilePath = './.env'; - - let envContent = ''; - if (fs.existsSync(envFilePath)) { - envContent = fs.readFileSync(envFilePath, 'utf-8'); - } - - const lines = envContent.split('\n').filter(Boolean); - const updatedContent = lines.map((line) => - line.startsWith(`${key}=`) ? `${key}=${value}` : line, - ); - - // Add the key if it doesn't exist - if (!lines.some((line) => line.startsWith(`${key}=`))) { - updatedContent.push(`${key}=${value}`); - } - - fs.writeFileSync(envFilePath, updatedContent.join('\n')); - console.log(`Updated .env file: ${key}=${value}`); -}; // Handle .env file creation or validation const handleEnvFile = (): void => { @@ -64,7 +42,7 @@ const askAndUpdatePort = async (): Promise => { type: 'confirm', name: 'shouldSetCustomPortResponse', message: - 'Would you like to set up a custom port for running talawa-admin without docker ?', + 'Would you like to set up a custom port for running Talawa Admin without Docker?', default: true, }); @@ -74,38 +52,10 @@ const askAndUpdatePort = async (): Promise => { throw new Error('Port must be between 1024 and 65535'); } - updateDockerEnvFile('PORT', String(customPort)); + updateEnvFile('PORT', String(customPort)); } }; -// Generate Docker file -const generateDockerfile = (port: string): void => { - const dockerfileContent = ` - # Stage 1: Build - FROM node:20.10.0-alpine AS build - - # Set working directory - WORKDIR /usr/src/app - - # Copy package files and install dependencies - COPY package*.json ./ - RUN npm install - - # Copy source code and build - COPY . . - RUN npm run build - - # Expose the specified port - EXPOSE ${port} - - # Start the application - CMD ["npm", "run", "serve"] - `; - - fs.writeFileSync('Dockerfile', dockerfileContent); - console.log(`Dockerfile generated successfully with port ${port}! 🚀`); -}; - // Function to manage Docker setup const askAndSetDockerOption = async (): Promise => { const { useDocker } = await inquirer.prompt({ @@ -117,49 +67,22 @@ const askAndSetDockerOption = async (): Promise => { if (useDocker) { console.log('Setting up with Docker...'); - updateDockerEnvFile('USE_DOCKER', 'YES'); - - const dockerConfig = await askForDocker(); // Prompt for Docker configuration - - // Ensure Docker config is valid - if (dockerConfig.dockerAppPort && dockerConfig.containerName) { - generateDockerfile(dockerConfig.dockerAppPort); - - const defaultPort = dockerConfig.dockerAppPort; - const containerName = dockerConfig.containerName; - - console.log(` - ✨ **Next Steps**: - 1. To build the Docker image, use: - \`docker build -t ${containerName} .\` - - 2. The default Docker application port is **${defaultPort}**. You can run the container with this default port using: - \`docker run -d -p ${defaultPort}:${defaultPort} ${containerName}\` - - 3. To use a custom port (e.g., 5000), you can override the default port by running: - \`docker run -d -p 5000:${defaultPort} ${containerName}\` - - 4. If you don’t specify a custom port, the default exposed port (4321) will be used. - `); - - const dockerUrl = process.env.REACT_APP_TALAWA_URL?.replace( - 'localhost', - 'host.docker.internal', - ); - - if (dockerUrl) { - updateDockerEnvFile('REACT_APP_DOCKER_TALAWA_URL', dockerUrl); - } else { - console.warn( - '⚠️ Docker URL setup skipped as no Talawa API URL was provided.', - ); - } - } else { - console.warn('⚠️ Docker setup incomplete due to missing configuration.'); - } + updateEnvFile('USE_DOCKER', 'YES'); + const answers = await askForDocker(); + const DOCKER_PORT_NUMBER = answers; + updateEnvFile('DOCKER_PORT', DOCKER_PORT_NUMBER); + + const DOCKER_NAME = 'talawa-admin'; + console.log(` + + Run the commands below after setup:- + 1. docker build -t ${DOCKER_NAME} . + 2. docker run -d -p ${DOCKER_PORT_NUMBER}:${DOCKER_PORT_NUMBER} ${DOCKER_NAME} + + `); } else { console.log('Setting up without Docker...'); - updateDockerEnvFile('USE_DOCKER', 'NO'); + updateEnvFile('USE_DOCKER', 'NO'); } }; @@ -180,7 +103,7 @@ const askAndUpdateTalawaApiUrl = async (): Promise => { endpoint = await askForTalawaApiUrl(); const url = new URL(endpoint); if (!['http:', 'https:'].includes(url.protocol)) { - throw new Error('Invalid URL protocol.Must be http or https'); + throw new Error('Invalid URL protocol. Must be http or https'); } isConnected = await checkConnection(url.origin); } @@ -249,10 +172,19 @@ export async function main(): Promise { console.log('Welcome to the Talawa Admin setup! 🚀'); handleEnvFile(); - await askAndSetDockerOption(); - await askAndUpdatePort(); - await askAndUpdateTalawaApiUrl(); + const envConfig = dotenv.parse(fs.readFileSync('.env', 'utf8')); + const useDocker = envConfig.USE_DOCKER === 'YES'; + + // Only run these commands if Docker is NOT used + if (useDocker) { + console.log(' '); + } else { + console.log('Setting up Talawa Admin without Docker...'); + await askAndUpdatePort(); + await askAndUpdateTalawaApiUrl(); + } + await askAndSetRecaptcha(); await askAndSetLogErrors(); diff --git a/src/setup/askForDocker/askForDocker.test.ts b/src/setup/askForDocker/askForDocker.test.ts index 62f04fb574..80a818d859 100644 --- a/src/setup/askForDocker/askForDocker.test.ts +++ b/src/setup/askForDocker/askForDocker.test.ts @@ -1,72 +1,24 @@ import inquirer from 'inquirer'; -import { askForDocker } from './askForDocker'; // Adjust the import path if necessary +import { askForDocker } from './askForDocker'; jest.mock('inquirer'); -describe('askForDocker', () => { - test('should return default docker port if user provides no input for dockerAppPort', async () => { - jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ - useDocker: true, - dockerAppPort: '4321', - containerName: 'talawa-admin', - }); +describe('askForCustomPort', () => { + test('should return default docker port if user provides no input', async () => { + jest + .spyOn(inquirer, 'prompt') + .mockResolvedValueOnce({ customPort: '4321' }); const result = await askForDocker(); - expect(result.dockerAppPort).toBe('4321'); + expect(result).toBe('4321'); }); - test('should return user-provided docker port', async () => { - jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ - useDocker: true, - dockerAppPort: '8080', - containerName: 'talawa-admin', - }); + test('should return user-provided port', async () => { + jest + .spyOn(inquirer, 'prompt') + .mockResolvedValueOnce({ customPort: '8080' }); const result = await askForDocker(); - expect(result.dockerAppPort).toBe('8080'); - }); - - test('should return default container name if user provides no input', async () => { - jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ - useDocker: true, - dockerAppPort: '4321', - containerName: 'talawa-admin', - }); - - const result = await askForDocker(); - expect(result.containerName).toBe('talawa-admin'); - }); - - test('should return user-provided container name', async () => { - jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ - useDocker: true, - dockerAppPort: '4321', - containerName: 'my-docker-container', - }); - - const result = await askForDocker(); - expect(result.containerName).toBe('my-docker-container'); - }); - - test('should default to useDocker = true', async () => { - jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ - useDocker: true, - dockerAppPort: '4321', - containerName: 'talawa-admin', - }); - - const result = await askForDocker(); - expect(result.useDocker).toBe(true); - }); - - test('should return false for useDocker if user selects "no"', async () => { - jest.spyOn(inquirer, 'prompt').mockResolvedValueOnce({ - useDocker: false, - dockerAppPort: '4321', - containerName: 'talawa-admin', - }); - - const result = await askForDocker(); - expect(result.useDocker).toBe(false); + expect(result).toBe('8080'); }); }); diff --git a/src/setup/askForDocker/askForDocker.ts b/src/setup/askForDocker/askForDocker.ts index 9c0afee25a..8227b5a303 100644 --- a/src/setup/askForDocker/askForDocker.ts +++ b/src/setup/askForDocker/askForDocker.ts @@ -1,30 +1,14 @@ import inquirer from 'inquirer'; -export const askForDocker = async (): Promise<{ - useDocker: boolean; - dockerAppPort: string; - containerName: string; -}> => { +export const askForDocker = async (): Promise => { const answers = await inquirer.prompt([ - { - type: 'confirm', - name: 'useDocker', - message: 'Do you want to use Docker for this project?', - default: true, - }, { type: 'input', name: 'dockerAppPort', message: 'Enter the port to expose Docker (default: 4321):', default: 4321, }, - { - type: 'input', - name: 'containerName', - message: 'Enter the name for the Docker container:', - default: 'talawa-admin', - }, ]); - return answers; + return answers.dockerAppPort; }; From 5c41622a801e8e02e621bf9b25a26a18f94f0922 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Fri, 29 Nov 2024 17:36:28 +0530 Subject: [PATCH 48/68] updated linting error --- .eslintignore | 2 ++ Dockerfile | 34 ++++++++++++++-------------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.eslintignore b/.eslintignore index 1b2a7f0c82..d00ba72b77 100644 --- a/.eslintignore +++ b/.eslintignore @@ -22,3 +22,5 @@ tsconfig.json Dockerfile .dockerignore .git/ + +\*.md diff --git a/Dockerfile b/Dockerfile index c64ba7e216..f4c1755847 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,15 @@ +FROM node:20.10.0-alpine AS build - # Stage 1: Build - FROM node:20.10.0-alpine AS build - - # Set working directory - WORKDIR /usr/src/app - - # Copy package files and install dependencies - COPY package*.json ./ - RUN npm install - - # Copy source code and build - COPY . . - RUN npm run build - - # Expose the specified port - EXPOSE 5000 - - # Start the application - CMD ["npm", "run", "serve"] - \ No newline at end of file +WORKDIR /usr/src/app + +COPY package*.json ./ + +RUN npm install + +COPY . . + +RUN npm run build + +EXPOSE 4321 + +CMD ["npm", "run", "serve"] From 99bd73946bd892c3ecfc6f1059a079e717faa91f Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 2 Dec 2024 08:42:59 +0530 Subject: [PATCH 49/68] testing --- .eslintignore | 1 - scripts/githooks/check-localstorage-usage.js | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.eslintignore b/.eslintignore index a2adca2f3a..56356391d7 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,7 +7,6 @@ tsconfig.json \*.swp .vscode/ -\*.md Dockerfile .dockerignore diff --git a/scripts/githooks/check-localstorage-usage.js b/scripts/githooks/check-localstorage-usage.js index 0a7e2adbfc..69ef5b7f9d 100755 --- a/scripts/githooks/check-localstorage-usage.js +++ b/scripts/githooks/check-localstorage-usage.js @@ -93,4 +93,9 @@ if (filesWithLocalStorage.length > 0) { ); process.exit(1); +} else { + console.log('No localStorage usage detected. All checks passed.'); } + +// Ensure the script exits cleanly +return; From c298068396b00069b4b8efce8fb0514e77bc982a Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 2 Dec 2024 10:54:28 +0530 Subject: [PATCH 50/68] testing type error issue --- scripts/githooks/check-localstorage-usage.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/githooks/check-localstorage-usage.js b/scripts/githooks/check-localstorage-usage.js index 69ef5b7f9d..0a7e2adbfc 100755 --- a/scripts/githooks/check-localstorage-usage.js +++ b/scripts/githooks/check-localstorage-usage.js @@ -93,9 +93,4 @@ if (filesWithLocalStorage.length > 0) { ); process.exit(1); -} else { - console.log('No localStorage usage detected. All checks passed.'); } - -// Ensure the script exits cleanly -return; From a8ee09e44c3f152cf007e3376798494ad25f6e4b Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 2 Dec 2024 18:11:53 +0530 Subject: [PATCH 51/68] updated eslint_disable_check.py --- .github/workflows/eslint_disable_check.py | 21 +++++-------- .github/workflows/pull-request.yml | 36 ++++++++++++----------- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/.github/workflows/eslint_disable_check.py b/.github/workflows/eslint_disable_check.py index 201b4462b8..0888de35de 100644 --- a/.github/workflows/eslint_disable_check.py +++ b/.github/workflows/eslint_disable_check.py @@ -18,7 +18,6 @@ 2) Pydocstyle 3) Pycodestyle 4) Flake8 - """ import os @@ -46,31 +45,27 @@ def has_eslint_disable(file_path): print(f"Error reading file {file_path}: {e}") return False -def check_eslint(directory): +def check_files_in_directory(directory): """ Recursively check TypeScript files for eslint-disable statements in the 'src' directory. Args: directory (str): Path to the directory. - + Returns: - bool: True if eslint-disable statement is found, False otherwise. + bool: True if eslint-disable statement is found in any file, False otherwise. """ eslint_found = False - for root, dirs, files in os.walk(os.path.join(directory, 'src')): + # Walk through the directory to find .ts and .tsx files + for root, dirs, files in os.walk(directory): for file_name in files: - if file_name.endswith('.tsx') and not file_name.endswith('.test.tsx'): + if file_name.endswith('.ts') or file_name.endswith('.tsx'): file_path = os.path.join(root, file_name) if has_eslint_disable(file_path): - print(f'File {file_path} contains eslint-disable statement.') + print(f"eslint-disable found in {file_path}") eslint_found = True - setup_path = os.path.join(directory, 'setup.ts') - if os.path.exists(setup_path) and has_eslint_disable(setup_path): - print(f'Setup file {setup_path} contains eslint-disable statement.') - eslint_found = True - return eslint_found def arg_parser_resolver(): @@ -110,7 +105,7 @@ def main(): sys.exit(1) # Check eslint in the specified directory - eslint_found = check_eslint(args.directory) + eslint_found = check_files_in_directory(args.directory) if eslint_found: print("ESLint-disable check failed. Exiting with error.") diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index ed8a5883de..581888e685 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -46,7 +46,7 @@ jobs: - name: Check formatting if: steps.changed-files.outputs.only_changed != 'true' run: npm run format:check - + - name: Run formatting if check fails if: failure() run: npm run format @@ -57,10 +57,10 @@ jobs: - name: Check for linting errors in modified files if: steps.changed-files.outputs.only_changed != 'true' - env: + env: CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py - + - name: Check for TSDoc comments run: npm run check-tsdoc # Run the TSDoc check script @@ -89,7 +89,7 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - + - name: Get Changed Unauthorized files id: changed-unauth-files uses: tj-actions/changed-files@v45 @@ -130,10 +130,10 @@ jobs: *.password *.secret *.credentials - + - name: List all changed unauthorized files if: steps.changed-unauth-files.outputs.any_changed == 'true' || steps.changed-unauth-files.outputs.any_deleted == 'true' - env: + env: CHANGED_UNAUTH_FILES: ${{ steps.changed-unauth-files.outputs.all_changed_files }} run: | for file in ${CHANGED_UNAUTH_FILES}; do @@ -154,14 +154,14 @@ jobs: uses: tj-actions/changed-files@v45 - name: Echo number of changed files - env: + env: CHANGED_FILES_COUNT: ${{ steps.changed-files.outputs.all_changed_files_count }} run: | echo "Number of files changed: $CHANGED_FILES_COUNT" - name: Check if the number of changed files is less than 100 if: steps.changed-files.outputs.all_changed_files_count > 100 - env: + env: CHANGED_FILES_COUNT: ${{ steps.changed-files.outputs.all_changed_files_count }} run: | echo "Error: Too many files (greater than 100) changed in the pull request." @@ -201,11 +201,11 @@ jobs: - name: Install Dependencies run: npm install - + - name: Get changed TypeScript files id: changed-files uses: tj-actions/changed-files@v45 - + - name: Run Jest Tests if: steps.changed-files.outputs.only_changed != 'true' env: @@ -227,8 +227,8 @@ jobs: if ! npx lcov-result-merger 'coverage/*/lcov.info' > 'coverage/lcov.info'; then echo "Failed to merge coverage reports" exit 1 - fi - + fi + - name: TypeScript compilation for changed files run: | for file in ${{ steps.changed-files.outputs.all_files }}; do @@ -249,7 +249,7 @@ jobs: - name: Test acceptable level of code coverage uses: VeryGoodOpenSource/very_good_coverage@v3 with: - path: "./coverage/lcov.info" + path: './coverage/lcov.info' min_coverage: 0.0 Graphql-Inspector: @@ -267,18 +267,19 @@ jobs: - name: resolve dependency run: npm install -g @graphql-inspector/cli - + - name: Clone API Repository run: | # Retrieve the complete branch name directly from the GitHub context FULL_BRANCH_NAME=${{ github.base_ref }} echo "FULL_Branch_NAME: $FULL_BRANCH_NAME" - + # Clone the specified repository using the extracted branch name - git clone --branch $FULL_BRANCH_NAME https://github.com/PalisadoesFoundation/talawa-api && ls -a + git clone --branch $FULL_BRANCH_NAME https://github.com/PalisadoesFoundation/talawa-api && ls -a - name: Validate Documents run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql' + Start-App-Without-Docker: name: Check if Talawa Admin app starts (No Docker) runs-on: ubuntu-latest @@ -350,6 +351,7 @@ jobs: if [ -f .pidfile_dev ]; then kill "$(cat .pidfile_dev)" fi + Docker-Start-Check: name: Check if Talawa Admin app starts in Docker runs-on: ubuntu-latest @@ -409,4 +411,4 @@ jobs: if: github.event.pull_request.base.ref != 'develop-postgres' run: | echo "Error: Pull request target branch must be 'develop-postgres'. Please refer PR_GUIDELINES.md" - exit 1 \ No newline at end of file + exit 1 From 425b45f2a408cc4d17163ae24514fdf3a81a4248 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 2 Dec 2024 18:18:29 +0530 Subject: [PATCH 52/68] updated eslint_disable_check.py --- .github/workflows/eslint_disable_check.py | 24 ++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/eslint_disable_check.py b/.github/workflows/eslint_disable_check.py index 0888de35de..a9c6b4b7f0 100644 --- a/.github/workflows/eslint_disable_check.py +++ b/.github/workflows/eslint_disable_check.py @@ -18,6 +18,7 @@ 2) Pydocstyle 3) Pycodestyle 4) Flake8 + """ import os @@ -45,27 +46,36 @@ def has_eslint_disable(file_path): print(f"Error reading file {file_path}: {e}") return False -def check_files_in_directory(directory): +def check_eslint(directory): """ Recursively check TypeScript files for eslint-disable statements in the 'src' directory. Args: directory (str): Path to the directory. - + Returns: - bool: True if eslint-disable statement is found in any file, False otherwise. + bool: True if eslint-disable statement is found, False otherwise. """ eslint_found = False - # Walk through the directory to find .ts and .tsx files - for root, dirs, files in os.walk(directory): + # Walk through the 'src' directory and check only .ts and .tsx files + for root, dirs, files in os.walk(os.path.join(directory, 'src')): for file_name in files: if file_name.endswith('.ts') or file_name.endswith('.tsx'): + # Exclude test files like .test.tsx + if file_name.endswith('.test.tsx'): + continue file_path = os.path.join(root, file_name) if has_eslint_disable(file_path): - print(f"eslint-disable found in {file_path}") + print(f'File {file_path} contains eslint-disable statement.') eslint_found = True + # Check 'setup.ts' file for eslint-disable + setup_path = os.path.join(directory, 'setup.ts') + if os.path.exists(setup_path) and has_eslint_disable(setup_path): + print(f'Setup file {setup_path} contains eslint-disable statement.') + eslint_found = True + return eslint_found def arg_parser_resolver(): @@ -105,7 +115,7 @@ def main(): sys.exit(1) # Check eslint in the specified directory - eslint_found = check_files_in_directory(args.directory) + eslint_found = check_eslint(args.directory) if eslint_found: print("ESLint-disable check failed. Exiting with error.") From dd635c4b6605a2a839090c59bd1225d0a59423dc Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 2 Dec 2024 18:25:50 +0530 Subject: [PATCH 53/68] updated eslint_disable_check.py --- .github/workflows/eslint_disable_check.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/eslint_disable_check.py b/.github/workflows/eslint_disable_check.py index a9c6b4b7f0..201b4462b8 100644 --- a/.github/workflows/eslint_disable_check.py +++ b/.github/workflows/eslint_disable_check.py @@ -58,19 +58,14 @@ def check_eslint(directory): """ eslint_found = False - # Walk through the 'src' directory and check only .ts and .tsx files for root, dirs, files in os.walk(os.path.join(directory, 'src')): for file_name in files: - if file_name.endswith('.ts') or file_name.endswith('.tsx'): - # Exclude test files like .test.tsx - if file_name.endswith('.test.tsx'): - continue + if file_name.endswith('.tsx') and not file_name.endswith('.test.tsx'): file_path = os.path.join(root, file_name) if has_eslint_disable(file_path): print(f'File {file_path} contains eslint-disable statement.') eslint_found = True - # Check 'setup.ts' file for eslint-disable setup_path = os.path.join(directory, 'setup.ts') if os.path.exists(setup_path) and has_eslint_disable(setup_path): print(f'Setup file {setup_path} contains eslint-disable statement.') From f27ed9e9a742e1acfbfff243f0a4a5eb4c625238 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 2 Dec 2024 18:34:23 +0530 Subject: [PATCH 54/68] updated pull-request.yml --- .github/workflows/pull-request.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 581888e685..3735d4117e 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -59,7 +59,20 @@ jobs: if: steps.changed-files.outputs.only_changed != 'true' env: CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} - run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py + run: | + # Filter files to include only .ts and .tsx files + TS_FILES=$(echo "$CHANGED_FILES" | grep -E '\.(ts|tsx)$') + + # Check if there are any TypeScript files to lint + if [ -n "$TS_FILES" ]; then + # Run linting on the changed TypeScript files + npx eslint $TS_FILES + + # Run the Python script for eslint-disable check on the TypeScript files + python .github/workflows/eslint_disable_check.py + else + echo "No .ts or .tsx files to lint." + fi - name: Check for TSDoc comments run: npm run check-tsdoc # Run the TSDoc check script From 93168082b6d08c296dbd0411b8bc28901b499821 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 2 Dec 2024 18:44:25 +0530 Subject: [PATCH 55/68] updated pull-request.yml --- .github/workflows/pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3735d4117e..0a933c64f5 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -66,7 +66,8 @@ jobs: # Check if there are any TypeScript files to lint if [ -n "$TS_FILES" ]; then # Run linting on the changed TypeScript files - npx eslint $TS_FILES + npx eslint $TS_FILES --ignore-pattern '**/*.yml' --ignore-pattern '**/*.dockerfile' --ignore-pattern '**/*.py' --ignore-pattern '**/*.md' + # Run the Python script for eslint-disable check on the TypeScript files python .github/workflows/eslint_disable_check.py From ae3dac5c539678901cf333e0dc5dd6cf734b26df Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 2 Dec 2024 18:52:49 +0530 Subject: [PATCH 56/68] updated pull-request.yml --- .eslintignore | 4 ++++ .github/workflows/pull-request.yml | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.eslintignore b/.eslintignore index 56356391d7..c592c70c31 100644 --- a/.eslintignore +++ b/.eslintignore @@ -11,3 +11,7 @@ tsconfig.json Dockerfile .dockerignore .git/ + +**/\*.yml +**/_.dockerfile +\*\*/_.py \*_/_.md diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0a933c64f5..6e395a724b 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -66,7 +66,8 @@ jobs: # Check if there are any TypeScript files to lint if [ -n "$TS_FILES" ]; then # Run linting on the changed TypeScript files - npx eslint $TS_FILES --ignore-pattern '**/*.yml' --ignore-pattern '**/*.dockerfile' --ignore-pattern '**/*.py' --ignore-pattern '**/*.md' + npx eslint $TS_FILES --ignore-pattern '**/*.yml' --ignore-pattern '**/*.dockerfile' --ignore-pattern '**/*.py' --ignore-pattern '**/*.md' --no-ignore + # Run the Python script for eslint-disable check on the TypeScript files From 1f9cacca957ba30cd157b881f63155e855150174 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Mon, 2 Dec 2024 19:08:48 +0530 Subject: [PATCH 57/68] updated pull-request.yml --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 6e395a724b..b2c405751a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -66,7 +66,7 @@ jobs: # Check if there are any TypeScript files to lint if [ -n "$TS_FILES" ]; then # Run linting on the changed TypeScript files - npx eslint $TS_FILES --ignore-pattern '**/*.yml' --ignore-pattern '**/*.dockerfile' --ignore-pattern '**/*.py' --ignore-pattern '**/*.md' --no-ignore + npx eslint "${TS_FILES}" --ignore-pattern '{**/*.yml,**/*.dockerfile,**/*.py,**/*.md}' From e863c6be3b0d169951d3b684b40b2dd33dfd96df Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Wed, 4 Dec 2024 11:44:32 +0530 Subject: [PATCH 58/68] updated .eslintrc.json --- .eslintignore | 5 +++++ .eslintrc.json | 35 ++++++++++++++++++++---------- .github/workflows/pull-request.yml | 2 +- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.eslintignore b/.eslintignore index c592c70c31..552b9d9c75 100644 --- a/.eslintignore +++ b/.eslintignore @@ -15,3 +15,8 @@ Dockerfile **/\*.yml **/_.dockerfile \*\*/_.py \*_/_.md + +\*.md +Dockerfile +.eslintignore +node_modules/ diff --git a/.eslintrc.json b/.eslintrc.json index 165e406024..9fdc371c16 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,7 +4,6 @@ "node": true, "es6": true }, - "extends": [ "plugin:react/recommended", "eslint:recommended", @@ -26,7 +25,6 @@ "ecmaVersion": 2018, "sourceType": "module" }, - "plugins": [ "react", "@typescript-eslint", @@ -76,13 +74,11 @@ "camelcase": "off", "@typescript-eslint/naming-convention": [ "error", - { "selector": "interface", "format": ["PascalCase"], "prefix": ["Interface", "TestInterface"] }, - { "selector": ["typeAlias", "typeLike", "enum"], "format": ["PascalCase"] @@ -112,24 +108,19 @@ "format": ["camelCase"], "leadingUnderscore": "require" }, - { "selector": "variable", "modifiers": ["exported"], "format": null } ], - "react/jsx-pascal-case": [ "error", { "allowAllCaps": false, "allowNamespace": false } ], - "react/jsx-equals-spacing": ["warn", "never"], "react/no-this-in-sfc": "error", - "jest/expect-expect": 0, - "react/no-unstable-nested-components": ["error", { "allowAsProps": true }], "react/function-component-definition": [ 0, @@ -137,11 +128,33 @@ ], "prettier/prettier": "error" }, - "settings": { "react": { "version": "detect" } }, - "ignorePatterns": ["**/*.css", "**/*.scss", "**/*.less", "**/*.json"] + "ignorePatterns": [ + "**/*.css", + "**/*.scss", + "**/*.less", + "**/*.json", + "**/*.md", + "**/*.js", + "**/*.test.js", + "**/*.test.ts", + "**/*.test.tsx", + "**/*.spec.js", + "**/*.spec.ts", + "**/*.spec.tsx", + "**/*.d.ts", + "**/*.config.js", + "**/*.config.ts", + "**/*.babel.js", + "**/*.eslint.js", + "**/node_modules/**", + "**/build/**", + "**/dist/**", + "**/coverage/**", + "**/public/**" + ] } diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b2c405751a..2a01178532 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -66,7 +66,7 @@ jobs: # Check if there are any TypeScript files to lint if [ -n "$TS_FILES" ]; then # Run linting on the changed TypeScript files - npx eslint "${TS_FILES}" --ignore-pattern '{**/*.yml,**/*.dockerfile,**/*.py,**/*.md}' + npx eslint "${TS_FILES}" --ext .ts,.tsx --ignore-pattern '{**/*.yml,**/*.dockerfile,**/*.py,**/*.md}' From a859d25dc939c703db702252cd72b1018f9a1d9f Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Wed, 4 Dec 2024 11:49:23 +0530 Subject: [PATCH 59/68] updated .eslintrc.json --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 2a01178532..b2c405751a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -66,7 +66,7 @@ jobs: # Check if there are any TypeScript files to lint if [ -n "$TS_FILES" ]; then # Run linting on the changed TypeScript files - npx eslint "${TS_FILES}" --ext .ts,.tsx --ignore-pattern '{**/*.yml,**/*.dockerfile,**/*.py,**/*.md}' + npx eslint "${TS_FILES}" --ignore-pattern '{**/*.yml,**/*.dockerfile,**/*.py,**/*.md}' From 418092ec3b584be101347de65adce05799e74e1b Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Wed, 4 Dec 2024 11:55:14 +0530 Subject: [PATCH 60/68] updated .eslintrc.json --- .eslintrc.json | 35 ++++++++++-------------------- .github/workflows/pull-request.yml | 19 +--------------- 2 files changed, 12 insertions(+), 42 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 9fdc371c16..165e406024 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,6 +4,7 @@ "node": true, "es6": true }, + "extends": [ "plugin:react/recommended", "eslint:recommended", @@ -25,6 +26,7 @@ "ecmaVersion": 2018, "sourceType": "module" }, + "plugins": [ "react", "@typescript-eslint", @@ -74,11 +76,13 @@ "camelcase": "off", "@typescript-eslint/naming-convention": [ "error", + { "selector": "interface", "format": ["PascalCase"], "prefix": ["Interface", "TestInterface"] }, + { "selector": ["typeAlias", "typeLike", "enum"], "format": ["PascalCase"] @@ -108,19 +112,24 @@ "format": ["camelCase"], "leadingUnderscore": "require" }, + { "selector": "variable", "modifiers": ["exported"], "format": null } ], + "react/jsx-pascal-case": [ "error", { "allowAllCaps": false, "allowNamespace": false } ], + "react/jsx-equals-spacing": ["warn", "never"], "react/no-this-in-sfc": "error", + "jest/expect-expect": 0, + "react/no-unstable-nested-components": ["error", { "allowAsProps": true }], "react/function-component-definition": [ 0, @@ -128,33 +137,11 @@ ], "prettier/prettier": "error" }, + "settings": { "react": { "version": "detect" } }, - "ignorePatterns": [ - "**/*.css", - "**/*.scss", - "**/*.less", - "**/*.json", - "**/*.md", - "**/*.js", - "**/*.test.js", - "**/*.test.ts", - "**/*.test.tsx", - "**/*.spec.js", - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.d.ts", - "**/*.config.js", - "**/*.config.ts", - "**/*.babel.js", - "**/*.eslint.js", - "**/node_modules/**", - "**/build/**", - "**/dist/**", - "**/coverage/**", - "**/public/**" - ] + "ignorePatterns": ["**/*.css", "**/*.scss", "**/*.less", "**/*.json"] } diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b2c405751a..0a837087b4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -59,22 +59,7 @@ jobs: if: steps.changed-files.outputs.only_changed != 'true' env: CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} - run: | - # Filter files to include only .ts and .tsx files - TS_FILES=$(echo "$CHANGED_FILES" | grep -E '\.(ts|tsx)$') - - # Check if there are any TypeScript files to lint - if [ -n "$TS_FILES" ]; then - # Run linting on the changed TypeScript files - npx eslint "${TS_FILES}" --ignore-pattern '{**/*.yml,**/*.dockerfile,**/*.py,**/*.md}' - - - - # Run the Python script for eslint-disable check on the TypeScript files - python .github/workflows/eslint_disable_check.py - else - echo "No .ts or .tsx files to lint." - fi + run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py - name: Check for TSDoc comments run: npm run check-tsdoc # Run the TSDoc check script @@ -294,7 +279,6 @@ jobs: - name: Validate Documents run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql' - Start-App-Without-Docker: name: Check if Talawa Admin app starts (No Docker) runs-on: ubuntu-latest @@ -366,7 +350,6 @@ jobs: if [ -f .pidfile_dev ]; then kill "$(cat .pidfile_dev)" fi - Docker-Start-Check: name: Check if Talawa Admin app starts in Docker runs-on: ubuntu-latest From 65e2b3a8b3f3b2decf5de93251657478e8435429 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Wed, 4 Dec 2024 12:04:14 +0530 Subject: [PATCH 61/68] updated .eslintrc.json --- .github/workflows/pull-request.yml | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0a837087b4..72c1e4622a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -59,7 +59,7 @@ jobs: if: steps.changed-files.outputs.only_changed != 'true' env: CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} - run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py + run: npx eslint --ext .ts,.tsx ${CHANGED_FILES} - name: Check for TSDoc comments run: npm run check-tsdoc # Run the TSDoc check script diff --git a/package.json b/package.json index aee85b5772..657e8d0b18 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "test:vitest:coverage": "vitest run --coverage", "test": "cross-env NODE_ENV=test jest --env=./scripts/custom-test-env.js --watchAll --coverage", "eject": "react-scripts eject", + "lint": "eslint --ext .ts,.tsx src", "lint:check": "eslint \"**/*.{ts,tsx}\" --max-warnings=0 && python .github/workflows/eslint_disable_check.py", "lint:fix": "eslint --fix \"**/*.{ts,tsx}\"", "format:fix": "prettier --write \"**/*.{ts,tsx,json,scss,css}\"", From 55a8e7c172136cd0a5829b9aff18af749e1bbf1c Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Wed, 4 Dec 2024 12:11:16 +0530 Subject: [PATCH 62/68] updated .eslintrc.json --- .eslintignore | 16 ---------------- .github/workflows/pull-request.yml | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/.eslintignore b/.eslintignore index 552b9d9c75..79d7ae3139 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,19 +4,3 @@ src/components/CheckIn/tagTemplate.ts package.json package-lock.json tsconfig.json - -\*.swp -.vscode/ - -Dockerfile -.dockerignore -.git/ - -**/\*.yml -**/_.dockerfile -\*\*/_.py \*_/_.md - -\*.md -Dockerfile -.eslintignore -node_modules/ diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 72c1e4622a..0a837087b4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -59,7 +59,7 @@ jobs: if: steps.changed-files.outputs.only_changed != 'true' env: CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} - run: npx eslint --ext .ts,.tsx ${CHANGED_FILES} + run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py - name: Check for TSDoc comments run: npm run check-tsdoc # Run the TSDoc check script From 3591428cb049ce77be7b123ad2d22914f54d490d Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Wed, 4 Dec 2024 12:33:01 +0530 Subject: [PATCH 63/68] updated .eslintrc.json --- .eslintignore | 9 +++++++++ .eslintrc.json | 8 +------- jest.config.js | 3 ++- package.json | 1 - 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.eslintignore b/.eslintignore index 79d7ae3139..fcc8ab66fa 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,3 +4,12 @@ src/components/CheckIn/tagTemplate.ts package.json package-lock.json tsconfig.json + +Dockerfile + +_.yml +_.yaml + +\*.md + +package.json diff --git a/.eslintrc.json b/.eslintrc.json index 165e406024..f8e0d3a46d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -66,13 +66,7 @@ "@typescript-eslint/array-type": "error", "@typescript-eslint/consistent-type-assertions": "error", "@typescript-eslint/consistent-type-imports": "error", - "@typescript-eslint/explicit-function-return-type": [ - 2, - { - "allowExpressions": true, - "allowTypedFunctionExpressions": true - } - ], + "@typescript-eslint/explicit-function-return-type": "off", "camelcase": "off", "@typescript-eslint/naming-convention": [ "error", diff --git a/jest.config.js b/jest.config.js index 3083bcda4f..d15ec53598 100644 --- a/jest.config.js +++ b/jest.config.js @@ -10,7 +10,8 @@ export default { '!**/index.{js,ts}', '!**/*.d.ts', '!src/test/**', - '!vitest.config.ts',], + '!vitest.config.ts', + ], // setupFiles: ['react-app-polyfill/jsdom'], setupFiles: ['whatwg-fetch'], setupFilesAfterEnv: ['/src/setupTests.ts'], diff --git a/package.json b/package.json index 657e8d0b18..aee85b5772 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,6 @@ "test:vitest:coverage": "vitest run --coverage", "test": "cross-env NODE_ENV=test jest --env=./scripts/custom-test-env.js --watchAll --coverage", "eject": "react-scripts eject", - "lint": "eslint --ext .ts,.tsx src", "lint:check": "eslint \"**/*.{ts,tsx}\" --max-warnings=0 && python .github/workflows/eslint_disable_check.py", "lint:fix": "eslint --fix \"**/*.{ts,tsx}\"", "format:fix": "prettier --write \"**/*.{ts,tsx,json,scss,css}\"", From c860961f5c20a1e6bd07161f0445b1306297db29 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Wed, 4 Dec 2024 12:47:36 +0530 Subject: [PATCH 64/68] updated .eslintrc.json --- .eslintignore | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.eslintignore b/.eslintignore index fcc8ab66fa..0aad9cecb2 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,15 +1,4 @@ -# Contains the PDF file of the Tag as JSON string, thus does not need to be linted - src/components/CheckIn/tagTemplate.ts package.json package-lock.json tsconfig.json - -Dockerfile - -_.yml -_.yaml - -\*.md - -package.json From 5be01a65762ff5afddeebb689403d742071b108b Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Wed, 4 Dec 2024 13:23:11 +0530 Subject: [PATCH 65/68] added linters for dockerfile and markdown file --- .dockerfilelintrc.json | 5 + CODE_STYLE.md | 49 +- CONTRIBUTING.md | 6 + DOCUMENTATION.md | 12 +- INSTALLATION.md | 20 +- ISSUE_GUIDELINES.md | 10 +- PR_GUIDELINES.md | 1 + README.md | 12 +- package-lock.json | 675 ++++++++++++++++++ package.json | 2 + talawa-admin-docs/README.md | 11 +- .../components_OrgUpdate_OrgUpdateMocks.md | 4 +- ...ionDashboard_OrganizationDashboardMocks.md | 4 +- .../modules/screens_Users_UsersMocks.md | 4 +- 14 files changed, 758 insertions(+), 57 deletions(-) create mode 100644 .dockerfilelintrc.json diff --git a/.dockerfilelintrc.json b/.dockerfilelintrc.json new file mode 100644 index 0000000000..02256f63d6 --- /dev/null +++ b/.dockerfilelintrc.json @@ -0,0 +1,5 @@ +{ + "skipShellCheck": false, + "skipCritical": false, + "disableLineBreaks": false +} diff --git a/CODE_STYLE.md b/CODE_STYLE.md index df184b12a0..8f1dbbfa74 100644 --- a/CODE_STYLE.md +++ b/CODE_STYLE.md @@ -25,7 +25,7 @@ code style should not be changed and must be followed. - Typescript -- React.js +- React.js - CSS module @@ -43,7 +43,6 @@ code style should not be changed and must be followed. - Should make use of React hooks where appropriate - ## Code Style and Naming Conventions - All React components *must* be written in PascalCase, with their file names, and associated CSS modules being written in PascalCase @@ -55,13 +54,15 @@ code style should not be changed and must be followed. - Use of custom classes directly are refrained, use of modular css is encouraged along with bootstrap classes **Wrong way ❌** + ```
...
...
// No using personal custom classes directly, here you should not use myCustomClass2 .container{...} // No changing the property of already existing classes reserved by boostrap directly in css files ``` -**Correct ways ✅** +**Correct ways ✅** + ```
...
// Use custom class defined in modular css file
...
// Use classes already defined in Bootstrap @@ -74,7 +75,8 @@ code style should not be changed and must be followed. **Wrong way ❌** -Using plain Bootstrap classes and attributes without leveraging the React-Bootstrap library should be refrained. While it may work for basic functionality, it doesn't fully integrate with React and may cause issues when dealing with more complex state management or component interactions. +Using plain Bootstrap classes and attributes without leveraging the React-Bootstrap library should be refrained. While it may work for basic functionality, it doesn't fully integrate with React and may cause issues when dealing with more complex state management or component interactions. + ``` ``` - **Correct way ✅** It's recommended to use the React-Bootstrap library for seamless integration of Bootstrap components in a React application. + ``` import Dropdown from 'react-bootstrap/Dropdown'; @@ -114,10 +116,9 @@ function BasicExample() { export default BasicExample; ``` +## Test and Code Linting -## Test and Code Linting - -Unit tests must be written for *all* code submissions to the repository, +Unit tests must be written for *all* code submissions to the repository, the code submitted must also be linted ESLint and formatted with Prettier. ## Folder/Directory Structure @@ -125,16 +126,17 @@ the code submitted must also be linted ESLint and formatted with Prettier. ### Sub Directories of `src` `assets` - This houses all of the static assets used in the project - - `css` - This houses all of the css files used in the project - - `images` - This houses all of the images used in the project - - `scss` - This houses all of the scss files used in the project - - `components -` All Sass files for components - - `content -` All Sass files for content - - `forms -` All Sass files for forms - - `_talawa.scss` - Partial Sass file for Talawa - - `_utilities.scss` - Partial Sass file for utilities - - `_variables.scss` - Partial Sass file for variables - - `app.scss` - Main Sass file for the app, imports all other partial Sass files + +- `css` - This houses all of the css files used in the project +- `images` - This houses all of the images used in the project +- `scss` - This houses all of the scss files used in the project + - `components -` All Sass files for components + - `content -` All Sass files for content + - `forms -` All Sass files for forms + - `_talawa.scss` - Partial Sass file for Talawa + - `_utilities.scss` - Partial Sass file for utilities + - `_variables.scss` - Partial Sass file for variables + - `app.scss` - Main Sass file for the app, imports all other partial Sass files `components` - The directory for base components that will be used in the various views/screens @@ -148,7 +150,6 @@ the code submitted must also be linted ESLint and formatted with Prettier. `utils` - This holds the utility functions that do not fall into any of the other categories - ## Imports Absolute imports have been set up for the project, so imports may be done directly from `src`. @@ -161,10 +162,9 @@ import Navbar from 'components/Navbar/Navbar'; Imports should be grouped in the following order: - - React imports - - Third party imports - - Local imports - +- React imports +- Third party imports +- Local imports If there is more than one import from a single library, they should be grouped together @@ -213,7 +213,6 @@ Follow this [link](https://getbootstrap.com/docs/5.3/customize/sass/) to learn h - **_table.scss** - **_typography.scss** - - `src/assets/scss/forms/{'{partialFile}'}.scss` - where the {'{partialFile}'} are the following files - **_check-radios.scss** - **_floating-label.scss** @@ -245,9 +244,11 @@ To watch the Sass file for changes and compile it automatically, run the followi ``` npx sass src/assets/scss/app.scss src/assets/css/app.css --watch ``` + The `src/assets/css/app.css.map` file associates the generated CSS code with the original SCSS code. It allows you to see your SCSS code in the browser's developer tools for debugging. To skip generating the map file, run + ``` npx sass --no-source-map src/assets/scss/app.scss src/assets/css/app.css ``` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dbe448c807..d63dc00250 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -125,24 +125,30 @@ The process of proposing a change to Talawa Admin can be summarized as: 1. _General Information_ 1. The current code coverage of the repo is: [![codecov](https://codecov.io/gh/PalisadoesFoundation/talawa-admin/branch/develop/graph/badge.svg?token=II0R0RREES)](https://codecov.io/gh/PalisadoesFoundation/talawa-admin) 2. You can determine the percentage test coverage of your code by running these two commands in sequence: + ``` npm install npm run test --watchAll=false --coverage genhtml coverage/lcov.info -o coverage ``` + 3. The output of the `npm run test` command will give you a tablular coverage report per file 4. The overall coverage rate will be visible on the penultimate line of the `genhtml` command's output. 5. The `genhtml` command is part of the Linux `lcov` package. Similar packages can be found for Windows and MacOS. 6. The currently acceptable coverage rate can be found in the [GitHub Pull Request file](.github/workflows/pull-requests.yml). Search for the value below the line containing `min_coverage`. 2. _Testing Individual Files_ 1. You can test an individual file by running this command: + ``` npm run test --watchAll=false /path/to/test/file ``` + 2. You can get the test coverage report for that file by running this command. The report will list all tests in the suite. Those tests that are not run will have zero values. You will need to look for the output line relevant to your test file. + ``` npm run test --watchAll=false --coverage /path/to/test/file ``` + 3. _Creating your code coverage account_ 1. You can also see your code coverage online for your fork of the repo. This is provided by `codecov.io` diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 7691b5d452..2e6987d7d1 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -1,4 +1,5 @@ # Documentation + Welcome to our documentation guide. Here are some useful tips you need to know! # Table of Contents @@ -15,18 +16,21 @@ Welcome to our documentation guide. Here are some useful tips you need to know! Our documentation can be found in ONLY TWO PLACES: -1. ***Inline within the repository's code files***: We have automated processes to extract this information and place it in our Talawa documentation site [docs.talawa.io](https://docs.talawa.io/). +1. ***Inline within the repository's code files***: We have automated processes to extract this information and place it in our Talawa documentation site [docs.talawa.io](https://docs.talawa.io/). 1. ***In our `talawa-docs` repository***: Our [Talawa-Docs](https://github.com/PalisadoesFoundation/talawa-docs) repository contains user edited markdown files that are automatically integrated into our Talawa documentation site [docs.talawa.io](https://docs.talawa.io/) using the [Docusaurus](https://docusaurus.io/) package. ## How to use Docusaurus + The process in easy: + 1. Install `talawa-docs` on your system -1. Launch docusaurus on your system according to the `talawa-docs`documentation. - - A local version of `docs.talawa.io` should automatically launched in your browser at http://localhost:3000/ +1. Launch docusaurus on your system according to the `talawa-docs`documentation. + - A local version of `docs.talawa.io` should automatically launched in your browser at 1. Add/modify the markdown documents to the `docs/` directory of the `talawa-docs` repository 1. If adding a file, then you will also need to edit the `sidebars.js` which is used to generate the [docs.talawa.io](https://docs.talawa.io/) menus. -1. Always monitor the local website in your brower to make sure the changes are acceptable. +1. Always monitor the local website in your brower to make sure the changes are acceptable. - You'll be able to see errors that you can use for troubleshooting in the CLI window you used to launch the local website. ## Other information + ***PLEASE*** do not add markdown files in this repository. Add them to `talawa-docs`! diff --git a/INSTALLATION.md b/INSTALLATION.md index 1ed713567e..67a344620c 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -63,11 +63,13 @@ First you need a local copy of `talawa-admin`. Run the following command in the ![Image of user's clone](public/markdown/images/install2.png) 1. Clone the repository to your local computer (replacing the values in `{{}}`): + ```bash $ git clone https://github.com/{{YOUR GITHUB USERNAME}}/talawa-admin.git cd talawa-admin git checkout develop ``` + - **Note:** Make sure to check out the `develop` branch 1. You now have a local copy of the code files. For more detailed instructions on contributing code, and managing the versions of this repository with `git`, checkout our [CONTRIBUTING.md](./CONTRIBUTING.md) file. @@ -76,7 +78,7 @@ First you need a local copy of `talawa-admin`. Run the following command in the 1. Clone the repository to your local computer using this command: ```bash - $ git clone https://github.com/PalisadoesFoundation/talawa-admin.git + git clone https://github.com/PalisadoesFoundation/talawa-admin.git ``` ## Install node.js @@ -86,7 +88,7 @@ Best way to install and manage `node.js` is making use of node version managers. Follow these steps to install the `node.js` packages in Windows, Linux and MacOS. 1. For Windows: - 1. first install `node.js` from their website at https://nodejs.org + 1. first install `node.js` from their website at 1. When installing, don't click the option to install the `necessary tools`. These are not needed in our case. 2. then install [fnm](https://github.com/Schniz/fnm). Please read all the steps in this section first. 1. All the commands listed on this page will need to be run in a Windows terminal session in the `talawa-admin` directory. @@ -141,9 +143,9 @@ The prerequisites are now installed. The next step will be to get the app up and If you prefer to use Docker, you can install the app using the following command: -1. Create a `.env` file as described in the Configuration section +1. Create a `.env` file as described in the Configuration section -2. Build the Docker Image: +2. Build the Docker Image: Run the following command to build the Docker image: @@ -225,7 +227,7 @@ Add the endpoint for accessing talawa-api graphql service to the variable named ``` -REACT_APP_TALAWA_URL="http://API-IP-ADRESS:4000/graphql/" +REACT_APP_TALAWA_URL="" ``` @@ -233,7 +235,7 @@ If you are a software developer working on your local system, then the URL would ``` -REACT_APP_TALAWA_URL="http://localhost:4000/graphql/" +REACT_APP_TALAWA_URL="" ``` @@ -241,7 +243,7 @@ If you are trying to access Talawa Admin from a remote host with the API URL con ``` -REACT_APP_TALAWA_URL="http://YOUR-REMOTE-ADDRESS:4000/graphql/" +REACT_APP_TALAWA_URL="" ``` @@ -317,7 +319,7 @@ By default `talawa-admin` runs on port `4321` on your system's localhost. It is ``` -http://localhost:4321/ + ``` @@ -325,7 +327,7 @@ If you have specified a custom port number in your `.env` file, Talawa-Admin wil ``` -http://localhost:${{customPort}}/ + ``` diff --git a/ISSUE_GUIDELINES.md b/ISSUE_GUIDELINES.md index 5170de5839..16d0f605e0 100644 --- a/ISSUE_GUIDELINES.md +++ b/ISSUE_GUIDELINES.md @@ -5,6 +5,7 @@ In order to give everyone a chance to submit a issues reports and contribute to the Talawa project, we have put restrictions in place. This section outlines the guidelines that should be imposed upon issue reports in the Talawa project. ___ + ## Table of Contents @@ -19,14 +20,16 @@ ___ ___ + ## Issue Management In all cases please use the [GitHub open issue search](https://github.com/PalisadoesFoundation/talawa-admin/issues) to check whether the issue has already been reported. ### New Issues + To create new issues follow these steps: -1. Your issue may have already been created. Search for duplicate open issues before submitting yours.for similar deficiencies in the code.duplicate issues are created. +1. Your issue may have already been created. Search for duplicate open issues before submitting yours.for similar deficiencies in the code.duplicate issues are created. 1. Verify whether the issue has been fixed by trying to reproduce it using the latest master or development branch in the repository. 1. Click on the [`New Issue`](https://github.com/PalisadoesFoundation/talawa-admin/issues/new/choose) button 1. Use the templates to create a standardized report of what needs to be done and why. @@ -49,11 +52,12 @@ Working on these types of existing issues is a good way of getting started with Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the mentors of the merits of this feature. Please provide as much detail and context as possible. -### Monitoring the Creation of New Issues +### Monitoring the Creation of New Issues + 1. Join our `#talawa-github` slack channel for automatic issue and pull request updates. ## General Guidelines 1. Discuss issues in our various slack channels when necessary -2. Please do not derail or troll issues. +2. Please do not derail or troll issues. 3. Keep the discussion on topic and respect the opinions of others. diff --git a/PR_GUIDELINES.md b/PR_GUIDELINES.md index 4c904c782d..46412edbc4 100644 --- a/PR_GUIDELINES.md +++ b/PR_GUIDELINES.md @@ -47,6 +47,7 @@ npm run format:check 1. Please read our [CONTRIBUTING.md](CONTRIBUTING.md) document for details on our testing policy. ## Pull Request Processing + These are key guidelines for the procedure: ### Only submit PRs against our `develop` branch, not the default `main` branch diff --git a/README.md b/README.md index cbade9e407..cd39d881cf 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,11 @@ Talawa is a modular open source project to manage group activities of both non-p Core features include: -1. Membership management -2. Groups management -3. Event registrations -4. Recurring meetings -5. Facilities registrations +1. Membership management +2. Groups management +3. Event registrations +4. Recurring meetings +5. Facilities registrations `talawa` is based on the original `quito` code created by the [Palisadoes Foundation][pfd] as part of its annual Calico Challenge program. Calico provides paid summer internships for Jamaican university students to work on selected open source projects. They are mentored by software professionals and receive stipends based on the completion of predefined milestones. Calico was started in 2015. Visit [The Palisadoes Foundation's website](http://www.palisadoes.org/) for more details on its origin and activities. @@ -50,7 +50,7 @@ Core features include: 1. The `talawa` documentation can be found at our [docs.talawa.io](https://docs.talawa.io) site. 1. It is automatically generated from the markdown files stored in our [Talawa-Docs GitHub repository](https://github.com/PalisadoesFoundation/talawa-docs). This makes it easy for you to update our documenation. -# Videos +# Videos 1. Visit our [YouTube Channel playlists](https://www.youtube.com/@PalisadoesOrganization/playlists) for more insights 1. The "[Getting Started - Developers](https://www.youtube.com/watch?v=YpBUoHxEeyg&list=PLv50qHwThlJUIzscg9a80a9-HmAlmUdCF&index=1)" videos are extremely helpful for new open source contributors. diff --git a/package-lock.json b/package-lock.json index 2404c03835..a42861447b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,6 +101,7 @@ "@vitest/coverage-istanbul": "^2.1.5", "babel-jest": "^29.7.0", "cross-env": "^7.0.3", + "dockerfilelint": "^1.8.0", "eslint": "^8.49.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.31.0", @@ -115,6 +116,7 @@ "jest-location-mock": "^2.0.0", "jest-preview": "^0.3.1", "lint-staged": "^15.2.8", + "markdownlint-cli": "^0.43.0", "postcss-modules": "^6.0.0", "sass": "^1.80.7", "tsx": "^4.19.1", @@ -8119,6 +8121,16 @@ "node": ">= 0.12.0" } }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/coffee-script": { "version": "1.12.7", "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", @@ -8758,6 +8770,16 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/decimal.js": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", @@ -8984,6 +9006,384 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" }, + "node_modules/dockerfilelint": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/dockerfilelint/-/dockerfilelint-1.8.0.tgz", + "integrity": "sha512-j0tipeP1kpTWfx1XV6QVrrJTtGiP/46+3NT5JuaqXUnYrNlusgvrSP4/ACkqQdglJfmeedIU7c2wztmxEV+JQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.4.2", + "cliui": "^4.1.0", + "js-yaml": "^3.6.0", + "lodash": "^4.3.0", + "yargs": "^13.2.1" + }, + "bin": { + "dockerfilelint": "bin/dockerfilelint" + } + }, + "node_modules/dockerfilelint/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/dockerfilelint/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/dockerfilelint/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/dockerfilelint/node_modules/cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "node_modules/dockerfilelint/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/dockerfilelint/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/dockerfilelint/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true, + "license": "MIT" + }, + "node_modules/dockerfilelint/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/dockerfilelint/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dockerfilelint/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/dockerfilelint/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/dockerfilelint/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dockerfilelint/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dockerfilelint/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/dockerfilelint/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/dockerfilelint/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/dockerfilelint/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/dockerfilelint/node_modules/wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dockerfilelint/node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dockerfilelint/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dockerfilelint/node_modules/wrap-ansi/node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dockerfilelint/node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dockerfilelint/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/dockerfilelint/node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/dockerfilelint/node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/dockerfilelint/node_modules/yargs/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/dockerfilelint/node_modules/yargs/node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/dockerfilelint/node_modules/yargs/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dockerfilelint/node_modules/yargs/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dockerfilelint/node_modules/yargs/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -13943,6 +14343,23 @@ "node": ">=6" } }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/jsx-ast-utils": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", @@ -14838,6 +15255,194 @@ "node": ">=0.10.0" } }, + "node_modules/markdownlint": { + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.36.1.tgz", + "integrity": "sha512-s73fU2CQN7WCgjhaQUQ8wYESQNzGRNOKDd+3xgVqu8kuTEhmwepd/mxOv1LR2oV046ONrTLBFsM7IoKWNvmy5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "markdown-it": "14.1.0", + "markdownlint-micromark": "0.1.12" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/DavidAnson" + } + }, + "node_modules/markdownlint-cli": { + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.43.0.tgz", + "integrity": "sha512-6vwurKK4B21eyYzwgX6ph13cZS7hE6LZfcS8QyD722CyxVD2RtAvbZK2p7k+FZbbKORulEuwl+hJaEq1l6/hoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "~12.1.0", + "glob": "~11.0.0", + "ignore": "~6.0.2", + "js-yaml": "^4.1.0", + "jsonc-parser": "~3.3.1", + "jsonpointer": "5.0.1", + "markdownlint": "~0.36.1", + "minimatch": "~10.0.1", + "run-con": "~1.3.2", + "smol-toml": "~1.3.1" + }, + "bin": { + "markdownlint": "markdownlint.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/markdownlint-cli/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/markdownlint-cli/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/markdownlint-cli/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/markdownlint-cli/node_modules/glob": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/markdownlint-cli/node_modules/ignore": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", + "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/markdownlint-cli/node_modules/jackspeak": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz", + "integrity": "sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/markdownlint-cli/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/markdownlint-cli/node_modules/lru-cache": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz", + "integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/markdownlint-cli/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/markdownlint-cli/node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/markdownlint-micromark": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/markdownlint-micromark/-/markdownlint-micromark-0.1.12.tgz", + "integrity": "sha512-RlB6EwMGgc0sxcIhOQ2+aq7Zw1V2fBnzbXKGgYK/mVWdT7cz34fteKSwfYeo4rL6+L/q2tyC9QtD/PgZbkdyJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/DavidAnson" + } + }, "node_modules/math-random": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", @@ -15396,6 +16001,16 @@ "node": ">=8" } }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/nwsapi": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", @@ -17119,6 +17734,13 @@ "node": ">=0.10.0" } }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true, + "license": "ISC" + }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -17411,6 +18033,32 @@ "node": ">=0.12.0" } }, + "node_modules/run-con": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.3.2.tgz", + "integrity": "sha512-CcfE+mYiTcKEzg0IqS08+efdnH0oJ3zV0wSUFBNrMHMuxCtXvBCLzCJHatwuXDcu/RlhjTziTo/a1ruQik6/Yg==", + "dev": true, + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~4.1.0", + "minimist": "^1.2.8", + "strip-json-comments": "~3.1.1" + }, + "bin": { + "run-con": "cli.js" + } + }, + "node_modules/run-con/node_modules/ini": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", + "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -17623,6 +18271,13 @@ "semver": "bin/semver.js" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true, + "license": "ISC" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -17828,6 +18483,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/smol-toml": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.1.tgz", + "integrity": "sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 18" + }, + "funding": { + "url": "https://github.com/sponsors/cyyynthia" + } + }, "node_modules/snake-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", @@ -20312,6 +20980,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "dev": true, + "license": "ISC" + }, "node_modules/which-typed-array": { "version": "1.1.15", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", diff --git a/package.json b/package.json index aee85b5772..f226318c8b 100644 --- a/package.json +++ b/package.json @@ -138,6 +138,7 @@ "@vitest/coverage-istanbul": "^2.1.5", "babel-jest": "^29.7.0", "cross-env": "^7.0.3", + "dockerfilelint": "^1.8.0", "eslint": "^8.49.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.31.0", @@ -152,6 +153,7 @@ "jest-location-mock": "^2.0.0", "jest-preview": "^0.3.1", "lint-staged": "^15.2.8", + "markdownlint-cli": "^0.43.0", "postcss-modules": "^6.0.0", "sass": "^1.80.7", "tsx": "^4.19.1", diff --git a/talawa-admin-docs/README.md b/talawa-admin-docs/README.md index 82dc89754c..f89f1b50d6 100644 --- a/talawa-admin-docs/README.md +++ b/talawa-admin-docs/README.md @@ -1,6 +1,7 @@ talawa-admin / [Modules](modules.md) # Talawa Admin + 💬 Join the community on Slack. The link can be found in the `Talawa` [README.md](https://github.com/PalisadoesFoundation/talawa) file. ![talawa-logo-lite-200x200](https://github.com/PalisadoesFoundation/talawa-admin/assets/16875803/26291ec5-d3c1-4135-8bc7-80885dff613d) @@ -14,11 +15,11 @@ Talawa is a modular open source project to manage group activities of both non-p Core features include: -1. Membership management -2. Groups management -3. Event registrations -4. Recurring meetings -5. Facilities registrations +1. Membership management +2. Groups management +3. Event registrations +4. Recurring meetings +5. Facilities registrations `talawa` is based on the original `quito` code created by the [Palisadoes Foundation][pfd] as part of its annual Calico Challenge program. Calico provides paid summer internships for Jamaican university students to work on selected open source projects. They are mentored by software professionals and receive stipends based on the completion of predefined milestones. Calico was started in 2015. Visit [The Palisadoes Foundation's website](http://www.palisadoes.org/) for more details on its origin and activities. diff --git a/talawa-admin-docs/modules/components_OrgUpdate_OrgUpdateMocks.md b/talawa-admin-docs/modules/components_OrgUpdate_OrgUpdateMocks.md index 356df928c1..a3620dd21d 100644 --- a/talawa-admin-docs/modules/components_OrgUpdate_OrgUpdateMocks.md +++ b/talawa-admin-docs/modules/components_OrgUpdate_OrgUpdateMocks.md @@ -14,7 +14,7 @@ ### MOCKS -• `Const` **MOCKS**: (\{ `request`: \{ `query`: `DocumentNode` = ORGANIZATIONS\_LIST; `variables`: \{ `address?`: `undefined` ; `description?`: `undefined` = 'This is a new update'; `id`: `string` = '123'; `image?`: `undefined` ; `name?`: `undefined` = ''; `userRegistrationRequired?`: `undefined` = true; `visibleInSearch?`: `undefined` = false \} \} ; `result`: \{ `data`: \{ `organizations`: \{ `_id`: `string` = '123'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `admins`: \{ `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `blockedUsers`: `never`[] = []; `creator`: \{ `email`: `string` = 'johndoe@example.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `description`: `string` = 'Equitable Access to STEM Education Jobs'; `image`: ``null`` = null; `members`: \{ `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `membershipRequests`: \{ `_id`: `string` = '456'; `user`: \{ `email`: `string` = 'samsmith@gmail.com'; `firstName`: `string` = 'Sam'; `lastName`: `string` = 'Smith' \} \} ; `name`: `string` = 'Palisadoes'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \}[] ; `updateOrganization?`: `undefined` \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = UPDATE\_ORGANIZATION\_MUTATION; `variables`: \{ `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `description`: `string` = 'This is an updated test organization'; `id`: `string` = '123'; `image`: `File` ; `name`: `string` = 'Updated Organization'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \} \} ; `result`: \{ `data`: \{ `organizations?`: `undefined` ; `updateOrganization`: \{ `_id`: `string` = '123'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `description`: `string` = 'This is an updated test organization'; `name`: `string` = 'Updated Organization'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \} \} \} \})[] +• `Const` **MOCKS**: (\{ `request`: \{ `query`: `DocumentNode` = ORGANIZATIONS\_LIST; `variables`: \{ `address?`: `undefined` ; `description?`: `undefined` = 'This is a new update'; `id`: `string` = '123'; `image?`: `undefined` ; `name?`: `undefined` = ''; `userRegistrationRequired?`: `undefined` = true; `visibleInSearch?`: `undefined` = false \} \} ; `result`: \{ `data`: \{ `organizations`: \{ `_id`: `string` = '123'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `admins`: \{ `_id`: `string` = '123'; `email`: `string` = ''; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `blockedUsers`: `never`[] = []; `creator`: \{ `email`: `string` = ''; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `description`: `string` = 'Equitable Access to STEM Education Jobs'; `image`: ``null`` = null; `members`: \{ `_id`: `string` = '123'; `email`: `string` = ''; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `membershipRequests`: \{ `_id`: `string` = '456'; `user`: \{ `email`: `string` = ''; `firstName`: `string` = 'Sam'; `lastName`: `string` = 'Smith' \} \} ; `name`: `string` = 'Palisadoes'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \}[] ; `updateOrganization?`: `undefined` \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = UPDATE\_ORGANIZATION\_MUTATION; `variables`: \{ `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `description`: `string` = 'This is an updated test organization'; `id`: `string` = '123'; `image`: `File` ; `name`: `string` = 'Updated Organization'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \} \} ; `result`: \{ `data`: \{ `organizations?`: `undefined` ; `updateOrganization`: \{ `_id`: `string` = '123'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `description`: `string` = 'This is an updated test organization'; `name`: `string` = 'Updated Organization'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \} \} \} \})[] #### Defined in @@ -34,7 +34,7 @@ ___ ### MOCKS\_ERROR\_UPDATE\_ORGLIST -• `Const` **MOCKS\_ERROR\_UPDATE\_ORGLIST**: (\{ `erorr?`: `undefined` ; `request`: \{ `query`: `DocumentNode` = ORGANIZATIONS\_LIST; `variables`: \{ `address?`: `undefined` ; `description?`: `undefined` = 'This is a new update'; `id`: `string` = '123'; `image?`: `undefined` ; `name?`: `undefined` = ''; `userRegistrationRequired?`: `undefined` = true; `visibleInSearch?`: `undefined` = false \} \} ; `result`: \{ `data`: \{ `organizations`: \{ `_id`: `string` = '123'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `admins`: \{ `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `blockedUsers`: `never`[] = []; `creator`: \{ `email`: `string` = 'johndoe@example.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `description`: `string` = 'Equitable Access to STEM Education Jobs'; `image`: ``null`` = null; `members`: \{ `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `membershipRequests`: \{ `_id`: `string` = '456'; `user`: \{ `email`: `string` = 'samsmith@gmail.com'; `firstName`: `string` = 'Sam'; `lastName`: `string` = 'Smith' \} \} ; `name`: `string` = 'Palisadoes'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \}[] \} \} \} \| \{ `erorr`: `Error` ; `request`: \{ `query`: `DocumentNode` = UPDATE\_ORGANIZATION\_MUTATION; `variables`: \{ `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `description`: `string` = 'This is an updated test organization'; `id`: `string` = '123'; `image`: `File` ; `name`: `string` = 'Updated Organization'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \} \} ; `result?`: `undefined` \})[] +• `Const` **MOCKS\_ERROR\_UPDATE\_ORGLIST**: (\{ `erorr?`: `undefined` ; `request`: \{ `query`: `DocumentNode` = ORGANIZATIONS\_LIST; `variables`: \{ `address?`: `undefined` ; `description?`: `undefined` = 'This is a new update'; `id`: `string` = '123'; `image?`: `undefined` ; `name?`: `undefined` = ''; `userRegistrationRequired?`: `undefined` = true; `visibleInSearch?`: `undefined` = false \} \} ; `result`: \{ `data`: \{ `organizations`: \{ `_id`: `string` = '123'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `admins`: \{ `_id`: `string` = '123'; `email`: `string` = ''; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `blockedUsers`: `never`[] = []; `creator`: \{ `email`: `string` = ''; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `description`: `string` = 'Equitable Access to STEM Education Jobs'; `image`: ``null`` = null; `members`: \{ `_id`: `string` = '123'; `email`: `string` = ''; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `membershipRequests`: \{ `_id`: `string` = '456'; `user`: \{ `email`: `string` = ''; `firstName`: `string` = 'Sam'; `lastName`: `string` = 'Smith' \} \} ; `name`: `string` = 'Palisadoes'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \}[] \} \} \} \| \{ `erorr`: `Error` ; `request`: \{ `query`: `DocumentNode` = UPDATE\_ORGANIZATION\_MUTATION; `variables`: \{ `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `description`: `string` = 'This is an updated test organization'; `id`: `string` = '123'; `image`: `File` ; `name`: `string` = 'Updated Organization'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \} \} ; `result?`: `undefined` \})[] #### Defined in diff --git a/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboardMocks.md b/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboardMocks.md index 58a98c70e1..d36a2d2c71 100644 --- a/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboardMocks.md +++ b/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboardMocks.md @@ -14,7 +14,7 @@ ### EMPTY\_MOCKS -• `Const` **EMPTY\_MOCKS**: (\{ `request`: \{ `query`: `DocumentNode` = ORGANIZATIONS\_LIST \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection?`: `undefined` ; `organizations`: \{ `_id`: `number` = 123; `address`: \{ `city`: `string` = 'Delhi'; `countryCode`: `string` = 'IN'; `dependentLocality`: `string` = 'Some Dependent Locality'; `line1`: `string` = '123 Random Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = '110001'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Delhi' \} ; `admins`: \{ `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `blockedUsers`: \{ `_id`: `string` = '789'; `email`: `string` = 'stevesmith@gmail.com'; `firstName`: `string` = 'Steve'; `lastName`: `string` = 'Smith' \}[] ; `creator`: \{ `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `description`: `string` = 'This is a Dummy Organization'; `image`: `string` = ''; `members`: \{ `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `membershipRequests`: `never`[] = []; `name`: `string` = 'Dummy Organization'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \}[] ; `postsByOrganizationConnection?`: `undefined` \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_POST\_CONNECTION\_LIST \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection?`: `undefined` ; `organizations?`: `undefined` ; `postsByOrganizationConnection`: \{ `edges`: `never`[] = [] \} \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_EVENT\_CONNECTION\_LIST \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection`: `never`[] = []; `organizations?`: `undefined` ; `postsByOrganizationConnection?`: `undefined` \} \} \})[] +• `Const` **EMPTY\_MOCKS**: (\{ `request`: \{ `query`: `DocumentNode` = ORGANIZATIONS\_LIST \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection?`: `undefined` ; `organizations`: \{ `_id`: `number` = 123; `address`: \{ `city`: `string` = 'Delhi'; `countryCode`: `string` = 'IN'; `dependentLocality`: `string` = 'Some Dependent Locality'; `line1`: `string` = '123 Random Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = '110001'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Delhi' \} ; `admins`: \{ `_id`: `string` = '123'; `email`: `string` = ''; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `blockedUsers`: \{ `_id`: `string` = '789'; `email`: `string` = ''; `firstName`: `string` = 'Steve'; `lastName`: `string` = 'Smith' \}[] ; `creator`: \{ `email`: `string` = ''; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `description`: `string` = 'This is a Dummy Organization'; `image`: `string` = ''; `members`: \{ `_id`: `string` = '123'; `email`: `string` = ''; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `membershipRequests`: `never`[] = []; `name`: `string` = 'Dummy Organization'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \}[] ; `postsByOrganizationConnection?`: `undefined` \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_POST\_CONNECTION\_LIST \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection?`: `undefined` ; `organizations?`: `undefined` ; `postsByOrganizationConnection`: \{ `edges`: `never`[] = [] \} \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_EVENT\_CONNECTION\_LIST \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection`: `never`[] = []; `organizations?`: `undefined` ; `postsByOrganizationConnection?`: `undefined` \} \} \})[] #### Defined in @@ -34,7 +34,7 @@ ___ ### MOCKS -• `Const` **MOCKS**: (\{ `request`: \{ `query`: `DocumentNode` = ORGANIZATIONS\_LIST; `variables?`: `undefined` \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection?`: `undefined` ; `organizations`: \{ `_id`: `number` = 123; `address`: \{ `city`: `string` = 'Delhi'; `countryCode`: `string` = 'IN'; `dependentLocality`: `string` = 'Some Dependent Locality'; `line1`: `string` = '123 Random Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = '110001'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Delhi' \} ; `admins`: \{ `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `blockedUsers`: \{ `_id`: `string` = '789'; `email`: `string` = 'stevesmith@gmail.com'; `firstName`: `string` = 'Steve'; `lastName`: `string` = 'Smith' \}[] ; `creator`: \{ `email`: `string` = ''; `firstName`: `string` = ''; `lastName`: `string` = '' \} ; `description`: `string` = 'This is a Dummy Organization'; `image`: `string` = ''; `members`: \{ `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `membershipRequests`: \{ `_id`: `string` = '456'; `user`: \{ `email`: `string` = 'janedoe@gmail.com'; `firstName`: `string` = 'Jane'; `lastName`: `string` = 'Doe' \} \}[] ; `name`: `string` = 'Dummy Organization'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \}[] ; `postsByOrganizationConnection?`: `undefined` \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_POST\_CONNECTION\_LIST; `variables?`: `undefined` \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection?`: `undefined` ; `organizations?`: `undefined` ; `postsByOrganizationConnection`: \{ `edges`: \{ `_id`: `string` = '6411e54835d7ba2344a78e29'; `commentCount`: `number` = 2; `comments`: \{ `__typename`: `string` = 'Comment'; `_id`: `string` = '64eb13beca85de60ebe0ed0e'; `creator`: \{ `__typename`: `string` = 'User'; `_id`: `string` = '63d6064458fce20ee25c3bf7'; `email`: `string` = 'test@gmail.com'; `firstName`: `string` = 'Noble'; `lastName`: `string` = 'Mittal' \} ; `likeCount`: `number` = 1; `likedBy`: \{ `_id`: `number` = 1 \}[] ; `text`: `string` = 'Yes, that is $50' \}[] ; `createdAt`: `Dayjs` ; `creator`: \{ `_id`: `string` = '640d98d9eb6a743d75341067'; `email`: `string` = 'adidacreator1@gmail.com'; `firstName`: `string` = 'Aditya'; `lastName`: `string` = 'Shelke' \} ; `imageUrl`: ``null`` = null; `likeCount`: `number` = 0; `likedBy`: \{ `_id`: `string` = '63d6064458fce20ee25c3bf7'; `firstName`: `string` = 'Comment'; `lastName`: `string` = 'Likkert' \}[] ; `pinned`: `boolean` = false; `text`: `string` = 'Hey, anyone saw my watch that I left at the office?'; `title`: `string` = 'Post 2'; `videoUrl`: ``null`` = null \}[] \} \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_EVENT\_CONNECTION\_LIST; `variables`: \{ `organization_id`: `string` = '123' \} \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection`: \{ `_id`: `string` = '1'; `allDay`: `boolean` = false; `description`: `string` = 'Sample Description'; `endDate`: `string` = '2023-10-29T23:59:59.000Z'; `endTime`: `string` = '17:00:00'; `isPublic`: `boolean` = true; `isRegisterable`: `boolean` = true; `location`: `string` = 'Sample Location'; `recurring`: `boolean` = false; `startDate`: `string` = '2023-10-29T00:00:00.000Z'; `startTime`: `string` = '08:00:00'; `title`: `string` = 'Sample Event' \}[] ; `organizations?`: `undefined` ; `postsByOrganizationConnection?`: `undefined` \} \} \})[] +• `Const` **MOCKS**: (\{ `request`: \{ `query`: `DocumentNode` = ORGANIZATIONS\_LIST; `variables?`: `undefined` \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection?`: `undefined` ; `organizations`: \{ `_id`: `number` = 123; `address`: \{ `city`: `string` = 'Delhi'; `countryCode`: `string` = 'IN'; `dependentLocality`: `string` = 'Some Dependent Locality'; `line1`: `string` = '123 Random Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = '110001'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Delhi' \} ; `admins`: \{ `_id`: `string` = '123'; `email`: `string` = ''; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `blockedUsers`: \{ `_id`: `string` = '789'; `email`: `string` = ''; `firstName`: `string` = 'Steve'; `lastName`: `string` = 'Smith' \}[] ; `creator`: \{ `email`: `string` = ''; `firstName`: `string` = ''; `lastName`: `string` = '' \} ; `description`: `string` = 'This is a Dummy Organization'; `image`: `string` = ''; `members`: \{ `_id`: `string` = '123'; `email`: `string` = ''; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \}[] ; `membershipRequests`: \{ `_id`: `string` = '456'; `user`: \{ `email`: `string` = ''; `firstName`: `string` = 'Jane'; `lastName`: `string` = 'Doe' \} \}[] ; `name`: `string` = 'Dummy Organization'; `userRegistrationRequired`: `boolean` = true; `visibleInSearch`: `boolean` = false \}[] ; `postsByOrganizationConnection?`: `undefined` \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_POST\_CONNECTION\_LIST; `variables?`: `undefined` \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection?`: `undefined` ; `organizations?`: `undefined` ; `postsByOrganizationConnection`: \{ `edges`: \{ `_id`: `string` = '6411e54835d7ba2344a78e29'; `commentCount`: `number` = 2; `comments`: \{ `__typename`: `string` = 'Comment'; `_id`: `string` = '64eb13beca85de60ebe0ed0e'; `creator`: \{ `__typename`: `string` = 'User'; `_id`: `string` = '63d6064458fce20ee25c3bf7'; `email`: `string` = ''; `firstName`: `string` = 'Noble'; `lastName`: `string` = 'Mittal' \} ; `likeCount`: `number` = 1; `likedBy`: \{ `_id`: `number` = 1 \}[] ; `text`: `string` = 'Yes, that is $50' \}[] ; `createdAt`: `Dayjs` ; `creator`: \{ `_id`: `string` = '640d98d9eb6a743d75341067'; `email`: `string` = ''; `firstName`: `string` = 'Aditya'; `lastName`: `string` = 'Shelke' \} ; `imageUrl`: ``null`` = null; `likeCount`: `number` = 0; `likedBy`: \{ `_id`: `string` = '63d6064458fce20ee25c3bf7'; `firstName`: `string` = 'Comment'; `lastName`: `string` = 'Likkert' \}[] ; `pinned`: `boolean` = false; `text`: `string` = 'Hey, anyone saw my watch that I left at the office?'; `title`: `string` = 'Post 2'; `videoUrl`: ``null`` = null \}[] \} \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_EVENT\_CONNECTION\_LIST; `variables`: \{ `organization_id`: `string` = '123' \} \} ; `result`: \{ `data`: \{ `eventsByOrganizationConnection`: \{ `_id`: `string` = '1'; `allDay`: `boolean` = false; `description`: `string` = 'Sample Description'; `endDate`: `string` = '2023-10-29T23:59:59.000Z'; `endTime`: `string` = '17:00:00'; `isPublic`: `boolean` = true; `isRegisterable`: `boolean` = true; `location`: `string` = 'Sample Location'; `recurring`: `boolean` = false; `startDate`: `string` = '2023-10-29T00:00:00.000Z'; `startTime`: `string` = '08:00:00'; `title`: `string` = 'Sample Event' \}[] ; `organizations?`: `undefined` ; `postsByOrganizationConnection?`: `undefined` \} \} \})[] #### Defined in diff --git a/talawa-admin-docs/modules/screens_Users_UsersMocks.md b/talawa-admin-docs/modules/screens_Users_UsersMocks.md index 31b72fc622..ce11d50b0c 100644 --- a/talawa-admin-docs/modules/screens_Users_UsersMocks.md +++ b/talawa-admin-docs/modules/screens_Users_UsersMocks.md @@ -24,7 +24,7 @@ ___ ### MOCKS -• `Const` **MOCKS**: (\{ `request`: \{ `query`: `DocumentNode` = USER\_ORGANIZATION\_LIST; `variables`: \{ `first?`: `undefined` = 8; `firstName_contains?`: `undefined` = 'john'; `id`: `string` = 'user1'; `lastName_contains?`: `undefined` = ''; `skip?`: `undefined` = 0 \} \} ; `result`: \{ `data`: \{ `organizationsConnection?`: `undefined` = organizations; `user`: \{ `_id`: `string` = 'user1'; `adminFor`: \{ `_id`: `number` = 1; `image`: `string` = ''; `name`: `string` = 'Palisadoes' \}[] ; `email`: `string` = 'John\_Does\_Palasidoes@gmail.com'; `firstName`: `string` = 'John'; `image`: `string` = ''; `lastName`: `string` = 'Doe'; `userType`: `string` = 'SUPERADMIN' \} ; `users?`: `undefined` \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = USER\_LIST; `variables`: \{ `first`: `number` = 12; `firstName_contains`: `string` = ''; `id?`: `undefined` = '456'; `lastName_contains`: `string` = ''; `skip`: `number` = 0 \} \} ; `result`: \{ `data`: \{ `organizationsConnection?`: `undefined` = organizations; `user?`: `undefined` ; `users`: \{ `_id`: `string` = 'user1'; `adminApproved`: `boolean` = true; `adminFor`: \{ `_id`: `string` = '123' \}[] ; `createdAt`: `string` = '20/06/2022'; `email`: `string` = 'john@example.com'; `firstName`: `string` = 'John'; `image`: ``null`` = null; `joinedOrganizations`: \{ `_id`: `string` = 'abc'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `createdAt`: `string` = '20/06/2022'; `creator`: \{ `_id`: `string` = '123'; `createdAt`: `string` = '20/06/2022'; `email`: `string` = 'john@example.com'; `firstName`: `string` = 'John'; `image`: ``null`` = null; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `name`: `string` = 'Joined Organization 1' \}[] ; `lastName`: `string` = 'Doe'; `organizationsBlockedBy`: \{ `_id`: `string` = 'xyz'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `createdAt`: `string` = '20/06/2022'; `creator`: \{ `_id`: `string` = '123'; `createdAt`: `string` = '20/06/2022'; `email`: `string` = 'john@example.com'; `firstName`: `string` = 'John'; `image`: ``null`` = null; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `name`: `string` = 'ABC' \}[] ; `userType`: `string` = 'SUPERADMIN' \}[] \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_CONNECTION\_LIST; `variables?`: `undefined` \} ; `result`: \{ `data`: \{ `organizationsConnection`: \{ `_id`: `number` = 123; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `admins`: \{ `_id`: `string` = 'user1' \}[] ; `createdAt`: `string` = '09/11/2001'; `creator`: \{ `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `members`: \{ `_id`: `string` = 'user1' \}[] ; `name`: `string` = 'Palisadoes' \}[] ; `user?`: `undefined` ; `users?`: `undefined` \} \} \})[] +• `Const` **MOCKS**: (\{ `request`: \{ `query`: `DocumentNode` = USER\_ORGANIZATION\_LIST; `variables`: \{ `first?`: `undefined` = 8; `firstName_contains?`: `undefined` = 'john'; `id`: `string` = 'user1'; `lastName_contains?`: `undefined` = ''; `skip?`: `undefined` = 0 \} \} ; `result`: \{ `data`: \{ `organizationsConnection?`: `undefined` = organizations; `user`: \{ `_id`: `string` = 'user1'; `adminFor`: \{ `_id`: `number` = 1; `image`: `string` = ''; `name`: `string` = 'Palisadoes' \}[] ; `email`: `string` = 'John\_Does\_Palasidoes@gmail.com'; `firstName`: `string` = 'John'; `image`: `string` = ''; `lastName`: `string` = 'Doe'; `userType`: `string` = 'SUPERADMIN' \} ; `users?`: `undefined` \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = USER\_LIST; `variables`: \{ `first`: `number` = 12; `firstName_contains`: `string` = ''; `id?`: `undefined` = '456'; `lastName_contains`: `string` = ''; `skip`: `number` = 0 \} \} ; `result`: \{ `data`: \{ `organizationsConnection?`: `undefined` = organizations; `user?`: `undefined` ; `users`: \{ `_id`: `string` = 'user1'; `adminApproved`: `boolean` = true; `adminFor`: \{ `_id`: `string` = '123' \}[] ; `createdAt`: `string` = '20/06/2022'; `email`: `string` = ''; `firstName`: `string` = 'John'; `image`: ``null`` = null; `joinedOrganizations`: \{ `_id`: `string` = 'abc'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `createdAt`: `string` = '20/06/2022'; `creator`: \{ `_id`: `string` = '123'; `createdAt`: `string` = '20/06/2022'; `email`: `string` = ''; `firstName`: `string` = 'John'; `image`: ``null`` = null; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `name`: `string` = 'Joined Organization 1' \}[] ; `lastName`: `string` = 'Doe'; `organizationsBlockedBy`: \{ `_id`: `string` = 'xyz'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `createdAt`: `string` = '20/06/2022'; `creator`: \{ `_id`: `string` = '123'; `createdAt`: `string` = '20/06/2022'; `email`: `string` = ''; `firstName`: `string` = 'John'; `image`: ``null`` = null; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `name`: `string` = 'ABC' \}[] ; `userType`: `string` = 'SUPERADMIN' \}[] \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_CONNECTION\_LIST; `variables?`: `undefined` \} ; `result`: \{ `data`: \{ `organizationsConnection`: \{ `_id`: `number` = 123; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `admins`: \{ `_id`: `string` = 'user1' \}[] ; `createdAt`: `string` = '09/11/2001'; `creator`: \{ `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `members`: \{ `_id`: `string` = 'user1' \}[] ; `name`: `string` = 'Palisadoes' \}[] ; `user?`: `undefined` ; `users?`: `undefined` \} \} \})[] #### Defined in @@ -34,7 +34,7 @@ ___ ### MOCKS2 -• `Const` **MOCKS2**: (\{ `request`: \{ `query`: `DocumentNode` = USER\_ORGANIZATION\_LIST; `variables`: \{ `first?`: `undefined` = 8; `firstName_contains?`: `undefined` = 'john'; `id`: `string` = 'user1'; `lastName_contains?`: `undefined` = ''; `skip?`: `undefined` = 0 \} \} ; `result`: \{ `data`: \{ `organizationsConnection?`: `undefined` = organizations; `user`: \{ `_id`: `string` = 'user1'; `adminFor`: \{ `_id`: `number` = 1; `image`: `string` = ''; `name`: `string` = 'Palisadoes' \}[] ; `email`: `string` = 'John\_Does\_Palasidoes@gmail.com'; `firstName`: `string` = 'John'; `image`: `string` = ''; `lastName`: `string` = 'Doe'; `userType`: `string` = 'SUPERADMIN' \} ; `users?`: `undefined` \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = USER\_LIST; `variables`: \{ `first`: `number` = 12; `firstName_contains`: `string` = ''; `id?`: `undefined` = '456'; `lastName_contains`: `string` = ''; `skip`: `number` = 0 \} \} ; `result`: \{ `data`: \{ `organizationsConnection?`: `undefined` = organizations; `user?`: `undefined` ; `users`: \{ `_id`: `string` = 'user1'; `adminApproved`: `boolean` = true; `adminFor`: \{ `_id`: `string` = '123' \}[] ; `createdAt`: `string` = '20/06/2022'; `email`: `string` = 'john@example.com'; `firstName`: `string` = 'John'; `image`: ``null`` = null; `joinedOrganizations`: \{ `_id`: `string` = 'abc'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `createdAt`: `string` = '20/06/2022'; `creator`: \{ `_id`: `string` = '123'; `createdAt`: `string` = '20/06/2022'; `email`: `string` = 'john@example.com'; `firstName`: `string` = 'John'; `image`: ``null`` = null; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `name`: `string` = 'Joined Organization 1' \}[] ; `lastName`: `string` = 'Doe'; `organizationsBlockedBy`: \{ `_id`: `string` = 'xyz'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `createdAt`: `string` = '20/06/2022'; `creator`: \{ `_id`: `string` = '123'; `createdAt`: `string` = '20/06/2022'; `email`: `string` = 'john@example.com'; `firstName`: `string` = 'John'; `image`: ``null`` = null; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `name`: `string` = 'ABC' \}[] ; `userType`: `string` = 'SUPERADMIN' \}[] \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_CONNECTION\_LIST; `variables?`: `undefined` \} ; `result`: \{ `data`: \{ `organizationsConnection`: \{ `_id`: `number` = 123; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `admins`: \{ `_id`: `string` = 'user1' \}[] ; `createdAt`: `string` = '09/11/2001'; `creator`: \{ `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `members`: \{ `_id`: `string` = 'user1' \}[] ; `name`: `string` = 'Palisadoes' \}[] ; `user?`: `undefined` ; `users?`: `undefined` \} \} \})[] +• `Const` **MOCKS2**: (\{ `request`: \{ `query`: `DocumentNode` = USER\_ORGANIZATION\_LIST; `variables`: \{ `first?`: `undefined` = 8; `firstName_contains?`: `undefined` = 'john'; `id`: `string` = 'user1'; `lastName_contains?`: `undefined` = ''; `skip?`: `undefined` = 0 \} \} ; `result`: \{ `data`: \{ `organizationsConnection?`: `undefined` = organizations; `user`: \{ `_id`: `string` = 'user1'; `adminFor`: \{ `_id`: `number` = 1; `image`: `string` = ''; `name`: `string` = 'Palisadoes' \}[] ; `email`: `string` = 'John\_Does\_Palasidoes@gmail.com'; `firstName`: `string` = 'John'; `image`: `string` = ''; `lastName`: `string` = 'Doe'; `userType`: `string` = 'SUPERADMIN' \} ; `users?`: `undefined` \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = USER\_LIST; `variables`: \{ `first`: `number` = 12; `firstName_contains`: `string` = ''; `id?`: `undefined` = '456'; `lastName_contains`: `string` = ''; `skip`: `number` = 0 \} \} ; `result`: \{ `data`: \{ `organizationsConnection?`: `undefined` = organizations; `user?`: `undefined` ; `users`: \{ `_id`: `string` = 'user1'; `adminApproved`: `boolean` = true; `adminFor`: \{ `_id`: `string` = '123' \}[] ; `createdAt`: `string` = '20/06/2022'; `email`: `string` = ''; `firstName`: `string` = 'John'; `image`: ``null`` = null; `joinedOrganizations`: \{ `_id`: `string` = 'abc'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `createdAt`: `string` = '20/06/2022'; `creator`: \{ `_id`: `string` = '123'; `createdAt`: `string` = '20/06/2022'; `email`: `string` = ''; `firstName`: `string` = 'John'; `image`: ``null`` = null; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `name`: `string` = 'Joined Organization 1' \}[] ; `lastName`: `string` = 'Doe'; `organizationsBlockedBy`: \{ `_id`: `string` = 'xyz'; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `createdAt`: `string` = '20/06/2022'; `creator`: \{ `_id`: `string` = '123'; `createdAt`: `string` = '20/06/2022'; `email`: `string` = ''; `firstName`: `string` = 'John'; `image`: ``null`` = null; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `name`: `string` = 'ABC' \}[] ; `userType`: `string` = 'SUPERADMIN' \}[] \} \} \} \| \{ `request`: \{ `query`: `DocumentNode` = ORGANIZATION\_CONNECTION\_LIST; `variables?`: `undefined` \} ; `result`: \{ `data`: \{ `organizationsConnection`: \{ `_id`: `number` = 123; `address`: \{ `city`: `string` = 'Kingston'; `countryCode`: `string` = 'JM'; `dependentLocality`: `string` = 'Sample Dependent Locality'; `line1`: `string` = '123 Jamaica Street'; `line2`: `string` = 'Apartment 456'; `postalCode`: `string` = 'JM12345'; `sortingCode`: `string` = 'ABC-123'; `state`: `string` = 'Kingston Parish' \} ; `admins`: \{ `_id`: `string` = 'user1' \}[] ; `createdAt`: `string` = '09/11/2001'; `creator`: \{ `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' \} ; `image`: ``null`` = null; `members`: \{ `_id`: `string` = 'user1' \}[] ; `name`: `string` = 'Palisadoes' \}[] ; `user?`: `undefined` ; `users?`: `undefined` \} \} \})[] #### Defined in From ff4ea49ee47c0837e267f7d4180027e6a71425e6 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Wed, 4 Dec 2024 13:29:24 +0530 Subject: [PATCH 66/68] Revert "updated .eslintrc.json" This reverts commit c860961f5c20a1e6bd07161f0445b1306297db29. --- .eslintignore | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.eslintignore b/.eslintignore index 0aad9cecb2..fcc8ab66fa 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,15 @@ +# Contains the PDF file of the Tag as JSON string, thus does not need to be linted + src/components/CheckIn/tagTemplate.ts package.json package-lock.json tsconfig.json + +Dockerfile + +_.yml +_.yaml + +\*.md + +package.json From da04be8998743870e7fa06ab6474315e079fc964 Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Wed, 4 Dec 2024 18:22:46 +0530 Subject: [PATCH 67/68] testing --- .eslintignore | 12 - package-lock.json | 1423 ++++++--------------------------------------- 2 files changed, 174 insertions(+), 1261 deletions(-) diff --git a/.eslintignore b/.eslintignore index fcc8ab66fa..f72f28afb2 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,15 +1,3 @@ # Contains the PDF file of the Tag as JSON string, thus does not need to be linted src/components/CheckIn/tagTemplate.ts -package.json -package-lock.json -tsconfig.json - -Dockerfile - -_.yml -_.yaml - -\*.md - -package.json diff --git a/package-lock.json b/package-lock.json index 2404c03835..02707d8cd9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,7 +101,7 @@ "@vitest/coverage-istanbul": "^2.1.5", "babel-jest": "^29.7.0", "cross-env": "^7.0.3", - "eslint": "^8.49.0", + "eslint": "^8.57.1", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.8.0", @@ -113,7 +113,7 @@ "jest": "^27.4.5", "jest-localstorage-mock": "^2.4.19", "jest-location-mock": "^2.0.0", - "jest-preview": "^0.3.1", + "jest-preview": "^0.2.3", "lint-staged": "^15.2.8", "postcss-modules": "^6.0.0", "sass": "^1.80.7", @@ -3055,9 +3055,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "license": "MIT", "engines": { @@ -3121,14 +3121,14 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "deprecated": "Use @eslint/config-array instead", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -4845,180 +4845,234 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.3.tgz", - "integrity": "sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.0.tgz", + "integrity": "sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.3.tgz", - "integrity": "sha512-zrt8ecH07PE3sB4jPOggweBjJMzI1JG5xI2DIsUbkA+7K+Gkjys6eV7i9pOenNSDJH3eOr/jLb/PzqtmdwDq5g==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.0.tgz", + "integrity": "sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "android" ] }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.0.tgz", + "integrity": "sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.3.tgz", - "integrity": "sha512-L1M0vKGO5ASKntqtsFEjTq/fD91vAqnzeaF6sfNAy55aD+Hi2pBI5DKwCO+UNDQHWsDViJLqshxOahXyLSh3EA==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.0.tgz", + "integrity": "sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "darwin" ] }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.0.tgz", + "integrity": "sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.0.tgz", + "integrity": "sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.3.tgz", - "integrity": "sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.0.tgz", + "integrity": "sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.3.tgz", - "integrity": "sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.0.tgz", + "integrity": "sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.3.tgz", - "integrity": "sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.0.tgz", + "integrity": "sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.3.tgz", - "integrity": "sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.0.tgz", + "integrity": "sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.3.tgz", - "integrity": "sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.0.tgz", + "integrity": "sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==", "cpu": [ "ppc64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.3.tgz", - "integrity": "sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.0.tgz", + "integrity": "sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==", "cpu": [ "riscv64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.3.tgz", - "integrity": "sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.0.tgz", + "integrity": "sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==", "cpu": [ "s390x" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.3.tgz", - "integrity": "sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.0.tgz", + "integrity": "sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.3.tgz", - "integrity": "sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.0.tgz", + "integrity": "sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.3.tgz", - "integrity": "sha512-9isNzeL34yquCPyerog+IMCNxKR8XYmGd0tHSV+OVx0TmE0aJOo9uw4fZfUuk2qxobP5sug6vNdZR6u7Mw7Q+Q==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.0.tgz", + "integrity": "sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.3.tgz", - "integrity": "sha512-nMIdKnfZfzn1Vsk+RuOvl43ONTZXoAPUUxgcU0tXooqg4YrAqzfKzVenqqk2g5efWh46/D28cKFrOzDSW28gTA==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.0.tgz", + "integrity": "sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A==", "cpu": [ "ia32" ], + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.3.tgz", - "integrity": "sha512-fOvu7PCQjAj4eWDEuD8Xz5gpzFqXzGlxHZozHP4b9Jxv9APtdxL6STqztDzMLuRXEc4UpXGGhx029Xgm91QBeA==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.0.tgz", + "integrity": "sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -5075,15 +5129,6 @@ "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.2.2.tgz", "integrity": "sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==" }, - "node_modules/@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/@sinonjs/commons": { "version": "1.8.6", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", @@ -5102,22 +5147,6 @@ "@sinonjs/commons": "^1.7.0" } }, - "node_modules/@svgr/babel-plugin-add-jsx-attribute": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.5.1.tgz", - "integrity": "sha512-9PYGcXrAxitycIjRmZB+Q0JaN07GZIWaTBIGQzfaZv+qr1n8X1XUEJ5rZ/vx6OVD9RRYlrNnXWExQXcmZeD/BQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@svgr/babel-plugin-remove-jsx-attribute": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-8.0.0.tgz", @@ -5150,183 +5179,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-6.5.1.tgz", - "integrity": "sha512-8DPaVVE3fd5JKuIC29dqyMB54sA6mfgki2H2+swh+zNJoynC8pMPzOkidqHOSc6Wj032fhl8Z0TVn1GiPpAiJg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-svg-dynamic-title": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-6.5.1.tgz", - "integrity": "sha512-FwOEi0Il72iAzlkaHrlemVurgSQRDFbk0OC8dSvD5fSBPHltNh7JtLsxmZUhjYBZo2PpcU/RJvvi6Q0l7O7ogw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-svg-em-dimensions": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-6.5.1.tgz", - "integrity": "sha512-gWGsiwjb4tw+ITOJ86ndY/DZZ6cuXMNE/SjcDRg+HLuCmwpcjOktwRF9WgAiycTqJD/QXqL2f8IzE2Rzh7aVXA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-react-native-svg": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-6.5.1.tgz", - "integrity": "sha512-2jT3nTayyYP7kI6aGutkyfJ7UMGtuguD72OjeGLwVNyfPRBD8zQthlvL+fAbAKk5n9ZNcvFkp/b1lZ7VsYqVJg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-svg-component": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-6.5.1.tgz", - "integrity": "sha512-a1p6LF5Jt33O3rZoVRBqdxL350oge54iZWHNI6LJB5tQ7EelvD/Mb1mfBiZNAan0dt4i3VArkFRjA4iObuNykQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-preset": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-6.5.1.tgz", - "integrity": "sha512-6127fvO/FF2oi5EzSQOAjo1LE3OtNVh11R+/8FXa+mHx1ptAaS4cknIjnUA7e6j6fwGGJ17NzaTJFUwOV2zwCw==", - "dev": true, - "dependencies": { - "@svgr/babel-plugin-add-jsx-attribute": "^6.5.1", - "@svgr/babel-plugin-remove-jsx-attribute": "*", - "@svgr/babel-plugin-remove-jsx-empty-expression": "*", - "@svgr/babel-plugin-replace-jsx-attribute-value": "^6.5.1", - "@svgr/babel-plugin-svg-dynamic-title": "^6.5.1", - "@svgr/babel-plugin-svg-em-dimensions": "^6.5.1", - "@svgr/babel-plugin-transform-react-native-svg": "^6.5.1", - "@svgr/babel-plugin-transform-svg-component": "^6.5.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/core": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/core/-/core-6.5.1.tgz", - "integrity": "sha512-/xdLSWxK5QkqG524ONSjvg3V/FkNyCv538OIBdQqPNaAta3AsXj/Bd2FbvR87yMbXO2hFSWiAe/Q6IkVPDw+mw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.19.6", - "@svgr/babel-preset": "^6.5.1", - "@svgr/plugin-jsx": "^6.5.1", - "camelcase": "^6.2.0", - "cosmiconfig": "^7.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@svgr/core/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@svgr/hast-util-to-babel-ast": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-6.5.1.tgz", - "integrity": "sha512-1hnUxxjd83EAxbL4a0JDJoD3Dao3hmjvyvyEV8PzWmLK3B9m9NPlW7GKjFyoWE8nM7HnXzPcmmSyOW8yOddSXw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.0", - "entities": "^4.4.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@svgr/plugin-jsx": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-6.5.1.tgz", - "integrity": "sha512-+UdQxI3jgtSjCykNSlEMuy1jSRQlGC7pqBCPvkG/2dATdWo082zHTTK3uhnAju2/6XpE6B5mZ3z4Z8Ns01S8Gw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.19.6", - "@svgr/babel-preset": "^6.5.1", - "@svgr/hast-util-to-babel-ast": "^6.5.1", - "svg-parser": "^2.0.4" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@svgr/core": "^6.0.0" - } - }, "node_modules/@swc/helpers": { "version": "0.4.14", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz", @@ -5335,18 +5187,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "dependencies": { - "defer-to-connect": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@testing-library/dom": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", @@ -5599,9 +5439,10 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "license": "MIT" }, "node_modules/@types/graceful-fs": { "version": "4.1.6", @@ -6620,15 +6461,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "dependencies": { - "string-width": "^4.1.0" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -7379,68 +7211,6 @@ "@popperjs/core": "^2.11.8" } }, - "node_modules/boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "dev": true, - "dependencies": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -7698,57 +7468,6 @@ "node": ">=8" } }, - "node_modules/cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -7959,18 +7678,6 @@ "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" }, - "node_modules/cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cli-cursor": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", @@ -8089,18 +7796,6 @@ "node": ">=0.8" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/clsx": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", @@ -8281,23 +7976,6 @@ "node": ">=0.10.0" } }, - "node_modules/configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -8447,10 +8125,11 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -8485,15 +8164,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/css-box-model": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/css-box-model/-/css-box-model-1.2.1.tgz", @@ -8764,18 +8434,6 @@ "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", "dev": true }, - "node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -8791,15 +8449,6 @@ "node": ">=6" } }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -8833,12 +8482,6 @@ "node": ">=0.8" } }, - "node_modules/defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -8914,15 +8557,6 @@ "minimalistic-assert": "^1.0.0" } }, - "node_modules/detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", @@ -9105,18 +8739,6 @@ "tslib": "^2.0.3" } }, - "node_modules/dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/dotenv": { "version": "16.4.5", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", @@ -9128,12 +8750,6 @@ "url": "https://dotenvx.com" } }, - "node_modules/duplexer3": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", - "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", - "dev": true - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -9206,15 +8822,6 @@ "iconv-lite": "^0.6.2" } }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -9468,15 +9075,6 @@ "node": ">=6" } }, - "node_modules/escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -9535,17 +9133,18 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -10255,18 +9854,6 @@ "node": ">=0.10.0" } }, - "node_modules/expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/expect": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", @@ -10471,16 +10058,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/find-node-modules": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/find-node-modules/-/find-node-modules-2.1.3.tgz", - "integrity": "sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==", - "dev": true, - "dependencies": { - "findup-sync": "^4.0.0", - "merge": "^2.1.1" - } - }, "node_modules/find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", @@ -10499,21 +10076,6 @@ "node": ">=8" } }, - "node_modules/findup-sync": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", - "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", - "dev": true, - "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^4.0.2", - "resolve-dir": "^1.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/flag-icons": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/flag-icons/-/flag-icons-7.2.3.tgz", @@ -10802,30 +10364,6 @@ "node": ">= 6" } }, - "node_modules/global-dirs": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", - "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", - "dev": true, - "dependencies": { - "ini": "2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/global-dirs/node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -10865,40 +10403,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/got/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -11059,15 +10563,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/hash-base": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", @@ -11165,18 +10660,6 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "dependencies": { - "parse-passwd": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/html-encoding-sniffer": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", @@ -11245,12 +10728,6 @@ "entities": "^4.4.0" } }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "dev": true - }, "node_modules/http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -11358,6 +10835,13 @@ "node": ">=0.10.0" } }, + "node_modules/icss-replace-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha512-chIaY3Vh2mh2Q3RGXttaDIzeiPvaVXJ+C4DAh/w3c37SKZ/U6PGMmuicR2EQQp9bKG8zLMCl7I+PtIoOOPp8Gg==", + "dev": true, + "license": "ISC" + }, "node_modules/icss-utils": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", @@ -11441,15 +10925,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -11502,12 +10977,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, "node_modules/inquirer": { "version": "8.2.6", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", @@ -11721,24 +11190,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "dependencies": { - "ci-info": "^2.0.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, - "node_modules/is-ci/node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, "node_modules/is-core-module": { "version": "2.15.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", @@ -11871,22 +11322,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "dependencies": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -11934,18 +11369,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -11969,15 +11392,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -12160,15 +11574,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -12181,12 +11586,6 @@ "node": ">=8" } }, - "node_modules/is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", - "dev": true - }, "node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", @@ -13270,34 +12669,26 @@ } }, "node_modules/jest-preview": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/jest-preview/-/jest-preview-0.3.1.tgz", - "integrity": "sha512-gRR4shnXFSh8tdNaIncJC98d1zXD7w7LA52HQC0bu0DsPb+FXVEg+NQh9GTbO+n6/SCgcZNQAVt4MeCfsIkBPA==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/jest-preview/-/jest-preview-0.2.3.tgz", + "integrity": "sha512-DxfXjoKsQN+zeP/MxoQQhAWZwYAucNdb9JCHGCHsydI1Wycj2PTPYJIptxzW6tvV0ZrMQQ2gjfQodqYD2vekyw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "dependencies": { - "@svgr/core": "^6.2.1", "camelcase": "^6.3.0", - "chalk": "^4.1.2", "chokidar": "^3.5.3", "commander": "^9.2.0", "connect": "^3.7.0", - "find-node-modules": "^2.1.3", "open": "^8.4.0", - "postcss-import": "^14.1.0", - "postcss-load-config": "^4.0.1", + "postcss": "^8.4.12", + "postcss-modules": "^4.3.1", "sirv": "^2.0.2", "slash": "^3.0.0", - "string-hash": "^1.1.3", - "update-notifier": "^5.1.0", "ws": "^8.5.0" }, "bin": { "jest-preview": "cli/index.js" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/jest-preview" } }, "node_modules/jest-preview/node_modules/camelcase": { @@ -13312,20 +12703,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-preview/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/jest-preview/node_modules/postcss-modules": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.3.1.tgz", + "integrity": "sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q==", "dev": true, + "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" + "generic-names": "^4.0.0", + "icss-replace-symbols": "^1.1.0", + "lodash.camelcase": "^4.3.0", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "string-hash": "^1.1.1" }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "peerDependencies": { + "postcss": "^8.0.0" } }, "node_modules/jest-regex-util": { @@ -13909,12 +13304,6 @@ "node": ">=6" } }, - "node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==", - "dev": true - }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -13958,15 +13347,6 @@ "node": ">=4.0" } }, - "node_modules/keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.0" - } - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -13984,18 +13364,6 @@ "node": ">=6" } }, - "node_modules/latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "dev": true, - "dependencies": { - "package-json": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/lazy-cache": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", @@ -14044,15 +13412,6 @@ "node": ">= 0.8.0" } }, - "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -14700,15 +14059,6 @@ "tslib": "^2.0.3" } }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -14751,30 +14101,6 @@ "source-map-js": "^1.2.0" } }, - "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==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "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" - } - }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -14881,13 +14207,7 @@ "node_modules/memoize-one": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", - "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" - }, - "node_modules/merge": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz", - "integrity": "sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==", - "dev": true + "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" }, "node_modules/merge-stream": { "version": "2.0.0", @@ -15057,15 +14377,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -15707,15 +15018,6 @@ "node": ">=0.10.0" } }, - "node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -15752,36 +15054,12 @@ "node": ">=6" } }, - "node_modules/package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "dev": true, - "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/package-json-from-dist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true }, - "node_modules/package-json/node_modules/semver": { - "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" - } - }, "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -15831,15 +15109,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/parse-srcset": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/parse-srcset/-/parse-srcset-1.0.2.tgz", @@ -15978,15 +15247,6 @@ "node": ">=0.10" } }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/pirates": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", @@ -16043,61 +15303,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/postcss-import": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz", - "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-load-config": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", - "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==", - "dev": true, - "dependencies": { - "lilconfig": "^2.0.5", - "yaml": "^2.1.1" - }, - "engines": { - "node": ">= 14" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/postcss-load-config/node_modules/yaml": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", - "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, "node_modules/postcss-modules": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-6.0.0.tgz", @@ -16204,15 +15409,6 @@ "node": ">= 0.8.0" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/prettier": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", @@ -16392,16 +15588,6 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -16419,18 +15605,6 @@ "node": ">=6" } }, - "node_modules/pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", - "dev": true, - "dependencies": { - "escape-goat": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/qs": { "version": "6.13.1", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", @@ -16521,30 +15695,6 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/react": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", @@ -16864,15 +16014,6 @@ "react-dom": ">=16.6.0" } }, - "node_modules/read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, - "dependencies": { - "pify": "^2.3.0" - } - }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -17012,30 +16153,6 @@ "node": ">=4" } }, - "node_modules/registry-auth-token": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.2.tgz", - "integrity": "sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==", - "dev": true, - "dependencies": { - "rc": "1.2.8" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "dev": true, - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/regjsgen": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", @@ -17167,61 +16284,6 @@ "node": ">=8" } }, - "node_modules/resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-dir/node_modules/global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-dir/node_modules/global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-dir/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -17256,15 +16318,6 @@ "node": ">=0.8" } }, - "node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==", - "dev": true, - "dependencies": { - "lowercase-keys": "^1.0.0" - } - }, "node_modules/restore-cursor": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", @@ -17358,11 +16411,12 @@ "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" }, "node_modules/rollup": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.3.tgz", - "integrity": "sha512-7sqRtBNnEbcBtMeRVc6VRsJMmpI+JU1z9VTvW8D4gXIYQFz0aLcsE6rRkyghZkLfEgUZgVvOG7A5CVz/VW5GIA==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.0.tgz", + "integrity": "sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ==", + "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -17372,37 +16426,27 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.21.3", - "@rollup/rollup-android-arm64": "4.21.3", - "@rollup/rollup-darwin-arm64": "4.21.3", - "@rollup/rollup-darwin-x64": "4.21.3", - "@rollup/rollup-linux-arm-gnueabihf": "4.21.3", - "@rollup/rollup-linux-arm-musleabihf": "4.21.3", - "@rollup/rollup-linux-arm64-gnu": "4.21.3", - "@rollup/rollup-linux-arm64-musl": "4.21.3", - "@rollup/rollup-linux-powerpc64le-gnu": "4.21.3", - "@rollup/rollup-linux-riscv64-gnu": "4.21.3", - "@rollup/rollup-linux-s390x-gnu": "4.21.3", - "@rollup/rollup-linux-x64-gnu": "4.21.3", - "@rollup/rollup-linux-x64-musl": "4.21.3", - "@rollup/rollup-win32-arm64-msvc": "4.21.3", - "@rollup/rollup-win32-ia32-msvc": "4.21.3", - "@rollup/rollup-win32-x64-msvc": "4.21.3", + "@rollup/rollup-android-arm-eabi": "4.28.0", + "@rollup/rollup-android-arm64": "4.28.0", + "@rollup/rollup-darwin-arm64": "4.28.0", + "@rollup/rollup-darwin-x64": "4.28.0", + "@rollup/rollup-freebsd-arm64": "4.28.0", + "@rollup/rollup-freebsd-x64": "4.28.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.28.0", + "@rollup/rollup-linux-arm-musleabihf": "4.28.0", + "@rollup/rollup-linux-arm64-gnu": "4.28.0", + "@rollup/rollup-linux-arm64-musl": "4.28.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.28.0", + "@rollup/rollup-linux-riscv64-gnu": "4.28.0", + "@rollup/rollup-linux-s390x-gnu": "4.28.0", + "@rollup/rollup-linux-x64-gnu": "4.28.0", + "@rollup/rollup-linux-x64-musl": "4.28.0", + "@rollup/rollup-win32-arm64-msvc": "4.28.0", + "@rollup/rollup-win32-ia32-msvc": "4.28.0", + "@rollup/rollup-win32-x64-msvc": "4.28.0", "fsevents": "~2.3.2" } }, - "node_modules/rollup/node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.3.tgz", - "integrity": "sha512-P0UxIOrKNBFTQaXTxOH4RxuEBVCgEA5UTNV6Yz7z9QHnUJ7eLX9reOd/NYMO3+XZO2cco19mXTxDMXxit4R/eQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ] - }, "node_modules/run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -17602,27 +16646,6 @@ "node": ">=10" } }, - "node_modules/semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "dependencies": { - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semver-diff/node_modules/semver": { - "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" - } - }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -18493,15 +17516,6 @@ "node": ">=0.10.0" } }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -19364,18 +18378,6 @@ "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==" }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/unist-util-is": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", @@ -19477,50 +18479,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "dev": true, - "dependencies": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" - } - }, - "node_modules/update-notifier/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -19552,18 +18510,6 @@ "requires-port": "^1.0.0" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==", - "dev": true, - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/url/node_modules/punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", @@ -20346,18 +19292,6 @@ "node": ">=8" } }, - "node_modules/widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dev": true, - "dependencies": { - "string-width": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -20431,15 +19365,6 @@ } } }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", From 780ae27a880f05b119de47500eb3d9e750d2b55b Mon Sep 17 00:00:00 2001 From: VanshikaSabharwal Date: Wed, 4 Dec 2024 19:30:35 +0530 Subject: [PATCH 68/68] testing changes --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0a837087b4..9cd3396825 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -59,7 +59,7 @@ jobs: if: steps.changed-files.outputs.only_changed != 'true' env: CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} - run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py + run: npx eslint "**/*.{js,jsx,ts,tsx}" --ignore-path .eslintignore - name: Check for TSDoc comments run: npm run check-tsdoc # Run the TSDoc check script