From e99a354888b20985b15713f5e54a373fadd4c73a Mon Sep 17 00:00:00 2001
From: RITANKAR SAHA
Date: Thu, 31 Oct 2024 13:31:28 +0530
Subject: [PATCH 01/12] fixed the async errors
---
.../controllers/contributorController.js | 57 ++++++++++---------
1 file changed, 30 insertions(+), 27 deletions(-)
diff --git a/webiu-server/controllers/contributorController.js b/webiu-server/controllers/contributorController.js
index 5f761d3d..c6b91bb8 100644
--- a/webiu-server/controllers/contributorController.js
+++ b/webiu-server/controllers/contributorController.js
@@ -18,36 +18,39 @@ const getAllContributors = async (req, res) => {
await Promise.all(
repositories.map(async (repo) => {
- const contributors = await fetchContributors(orgName, repo.name);
-
- if (!contributors) {
- return;
+ try {
+ const contributors = await fetchContributors(orgName, repo.name);
+ if (!contributors) return;
+
+ await Promise.all(
+ contributors.map(async (contributor) => {
+ try {
+ const userDetails = await fetchUserDetails(contributor.login);
+ if (!userDetails) return;
+
+ if (finalResponse[userDetails.login]) {
+ finalResponse[userDetails.login].repos.push(repo.name);
+ } else {
+ finalResponse[userDetails.login] = {
+ login: userDetails.login,
+ contributions: contributor.contributions,
+ repos: [repo.name],
+ followers: userDetails.followers,
+ following: userDetails.following,
+ avatar_url: userDetails.avatar_url,
+ };
+ }
+ } catch (err) {
+ console.error('Error in fetching user details:', err);
+ }
+ })
+ );
+ } catch (err) {
+ console.error('Error in fetching contributors:', err);
}
-
- await Promise.all(
- contributors.map(async (contributor) => {
- const userDetails = await fetchUserDetails(contributor.login);
-
- if (!userDetails) {
- return;
- }
-
- if (finalResponse[userDetails.login]) {
- finalResponse[userDetails.login].repos.push(repo.name);
- } else {
- finalResponse[userDetails.login] = {
- login: userDetails.login,
- contributions: contributor.contributions,
- repos: [repo.name],
- followers: userDetails.followers,
- following: userDetails.following,
- avatar_url: userDetails.avatar_url
- };
- }
- })
- );
})
);
+
let allContributors = []
for (const contributor in finalResponse){
allContributors.push(finalResponse[contributor]);
From 50d2105b9d56c89294e07be504584463375b1f47 Mon Sep 17 00:00:00 2001
From: RITANKAR SAHA
Date: Thu, 31 Oct 2024 13:36:49 +0530
Subject: [PATCH 02/12] fixed redundancy
---
webiu-server/controllers/contributorController.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webiu-server/controllers/contributorController.js b/webiu-server/controllers/contributorController.js
index c6b91bb8..26716bc2 100644
--- a/webiu-server/controllers/contributorController.js
+++ b/webiu-server/controllers/contributorController.js
@@ -111,6 +111,6 @@ async function fetchUserDetails(username) {
}
}
-module.exports = module.exports = {
+module.exports = {
getAllContributors,
};;
From fc5236e678c533cf7eb4c5d1972d9df2780e0e1c Mon Sep 17 00:00:00 2001
From: RITANKAR SAHA
Date: Sun, 3 Nov 2024 01:18:14 +0530
Subject: [PATCH 03/12] Modifications made according to the points mentioned in
the issue #92
---
.../contributors/contributors.component.ts | 97 +++++++------------
1 file changed, 36 insertions(+), 61 deletions(-)
diff --git a/webiu-ui/src/app/page/contributors/contributors.component.ts b/webiu-ui/src/app/page/contributors/contributors.component.ts
index 17ca6de5..8b29d66c 100644
--- a/webiu-ui/src/app/page/contributors/contributors.component.ts
+++ b/webiu-ui/src/app/page/contributors/contributors.component.ts
@@ -7,6 +7,8 @@ import { ProfileCardComponent } from '../../components/profile-card/profile-card
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { CommmonUtilService } from '../../common/service/commmon-util.service';
import { environment } from '../../../environments/environment';
+import { distinctUntilChanged } from 'rxjs/operators';
+
@Component({
selector: 'app-contributors',
standalone: true,
@@ -18,11 +20,11 @@ import { environment } from '../../../environments/environment';
ProfileCardComponent,
],
templateUrl: './contributors.component.html',
- styleUrl: './contributors.component.scss',
+ styleUrls: ['./contributors.component.scss'],
})
export class ContributorsComponent implements OnInit {
- profiles?: Contributor[];
- displayProfiles?: Contributor[];
+ profiles: Contributor[] = [];
+ displayProfiles: Contributor[] = [];
searchText = new FormControl('');
selectedRepo: string = '';
allRepos: string[] = [];
@@ -39,55 +41,32 @@ export class ContributorsComponent implements OnInit {
ngOnInit() {
this.getProfiles();
-
- this.searchText.valueChanges.subscribe(() => {
- this.filterProfiles();
- });
+
+ this.searchText.valueChanges.pipe(distinctUntilChanged()).subscribe(() => {
+ this.filterProfiles();
+ });
}
getProfiles() {
this.http
- .get(`${environment.serverUrl}/api/contributor/contributors`)
+ .get(`${environment.serverUrl}/api/contributor/contributors`)
.subscribe({
- next: (res) => {
- if (res) {
- this.profiles = res;
- this.commonUtil.commonProfiles = this.profiles;
- this.allRepos = this.getUniqueRepos();
- this.totalPages = Math.ceil(
- (this.profiles?.length || 0) / this.profilesPerPage
- );
- this.filterProfiles();
- this.isLoading = false;
- } else {
- this.profiles = contributors.flatMap((profile: any) => profile);
- this.allRepos = this.getUniqueRepos();
- this.totalPages = Math.ceil(
- (this.profiles?.length || 0) / this.profilesPerPage
- );
- this.filterProfiles();
- this.isLoading = false;
- }
- },
- error: (error) => {
- this.profiles = contributors.map((profile) => profile);
- this.allRepos = this.getUniqueRepos();
- this.totalPages = Math.ceil(
- (this.profiles?.length || 0) / this.profilesPerPage
- );
- this.filterProfiles();
- this.isLoading = false;
- },
+ next: (res) => this.handleProfileResponse(res || contributors),
+ error: () => this.handleProfileResponse(contributors),
});
}
+ handleProfileResponse(profiles: Contributor[]) {
+ this.profiles = profiles;
+ this.commonUtil.commonProfiles = this.profiles;
+ this.allRepos = this.getUniqueRepos();
+ this.totalPages = Math.ceil((this.profiles.length || 0) / this.profilesPerPage);
+ this.filterProfiles();
+ this.isLoading = false;
+ }
+
getUniqueRepos(): string[] {
- let array: string[] = [];
- if (this.profiles?.length) {
- const repos = this.profiles.flatMap((profile) => profile.repos);
- array = Array.from(new Set(repos));
- }
- return array;
+ return Array.from(new Set(this.profiles.flatMap((profile) => profile.repos)));
}
onRepoChange(event: Event) {
@@ -97,30 +76,26 @@ export class ContributorsComponent implements OnInit {
}
filterProfiles() {
- let searchTextValue: string =
- this.searchText.value?.toLocaleLowerCase().trim() || '';
- let filteredProfiles = this.profiles?.filter((doc) => {
- return (
- (searchTextValue?.length
- ? [doc.login].some((str) =>
- str.toLocaleLowerCase().includes(searchTextValue)
- )
- : true) &&
- (this.selectedRepo?.length
- ? doc.repos.includes(this.selectedRepo)
- : true)
- );
- });
-
- this.totalPages = Math.ceil(
- (filteredProfiles?.length || 0) / this.profilesPerPage
+ const searchTextValue = this.searchText.value?.toLocaleLowerCase().trim() || '';
+ const filteredProfiles = this.profiles.filter((doc) =>
+ this.matchesSearchText(doc, searchTextValue) && this.matchesSelectedRepo(doc)
);
- this.displayProfiles = filteredProfiles?.slice(
+
+ this.totalPages = Math.ceil(filteredProfiles.length / this.profilesPerPage);
+ this.displayProfiles = filteredProfiles.slice(
(this.currentPage - 1) * this.profilesPerPage,
this.currentPage * this.profilesPerPage
);
}
+ matchesSearchText(doc: Contributor, searchText: string): boolean {
+ return !searchText.length || doc.login.toLocaleLowerCase().includes(searchText);
+ }
+
+ matchesSelectedRepo(doc: Contributor): boolean {
+ return !this.selectedRepo.length || doc.repos.includes(this.selectedRepo);
+ }
+
nextPage() {
if (this.currentPage < this.totalPages) {
this.currentPage++;
From a7df4b58b944a991e1d9fa45d39cab99bacf0691 Mon Sep 17 00:00:00 2001
From: rajutkarsh07
Date: Tue, 12 Nov 2024 13:12:00 +0530
Subject: [PATCH 04/12] css fix
---
webiu-ui/src/app/app.component.scss | 339 +++++++++---------
.../components/navbar/navbar.component.scss | 3 +
.../profile-card/profile-card.component.scss | 106 +++---
.../contributors/contributors.component.scss | 9 +-
webiu-ui/src/styles.scss | 150 +++++---
5 files changed, 331 insertions(+), 276 deletions(-)
diff --git a/webiu-ui/src/app/app.component.scss b/webiu-ui/src/app/app.component.scss
index 4998c15d..b460baf1 100644
--- a/webiu-ui/src/app/app.component.scss
+++ b/webiu-ui/src/app/app.component.scss
@@ -1,284 +1,303 @@
-
* {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
}
-
html {
- font-size: 16px;
- scroll-behavior: smooth;
+ font-size: 16px;
+ scroll-behavior: smooth;
}
body {
- font-family: 'Roboto', sans-serif;
- background-color: #f4f7f9;
- color: #333;
- line-height: 1.6;
- margin: 0;
- padding: 0;
+ font-family: "Roboto", sans-serif;
+ background-color: #f4f7f9;
+ color: #333;
+ line-height: 1.6;
+ margin: 0;
+ padding: 0;
}
-
.main {
- width: 80%;
- margin: 0 auto;
+ width: 80%;
+ margin: 0 auto;
}
-
-h1, h2, h3, h4, h5, h6 {
- font-weight: 700;
- color: #222;
- margin-bottom: 1rem;
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ font-weight: 700;
+ color: #222;
}
h1 {
- font-size: 2.5rem;
- line-height: 1.2;
+ font-size: 2.5rem;
+ line-height: 1.2;
}
h2 {
- font-size: 2rem;
+ font-size: 2rem;
}
h3 {
- font-size: 1.75rem;
+ font-size: 1.75rem;
}
h4 {
- font-size: 1.5rem;
+ font-size: 1.5rem;
}
h5 {
- font-size: 1.25rem;
+ font-size: 1.25rem;
}
h6 {
- font-size: 1rem;
- font-weight: 600;
+ font-size: 1rem;
+ font-weight: 600;
}
p {
- margin-bottom: 1.5rem;
- font-size: 1rem;
- line-height: 1.8;
+ font-size: 1rem;
+ line-height: 1.8;
}
small {
- font-size: 0.85rem;
- color: #666;
+ font-size: 0.85rem;
+ color: #666;
}
-
a {
- color: #3498db;
- text-decoration: none;
- transition: color 0.3s ease;
+ color: #3498db;
+ text-decoration: none;
+ transition: color 0.3s ease;
}
a:hover {
- color: #2980b9;
- text-decoration: underline;
+ color: #2980b9;
+ text-decoration: underline;
}
-
-button, .btn {
- padding: 0.75rem 1.5rem;
- background-color: #3498db;
- color: #fff;
- border: none;
- border-radius: 5px;
- cursor: pointer;
- font-size: 1rem;
- transition: background-color 0.3s ease;
+button,
+.btn {
+ padding: 0.75rem 1.5rem;
+ background-color: #3498db;
+ color: #fff;
+ border: none;
+ border-radius: 5px;
+ cursor: pointer;
+ font-size: 1rem;
+ transition: background-color 0.3s ease;
}
-button:hover, .btn:hover {
- background-color: #2980b9;
+button:hover,
+.btn:hover {
+ background-color: #2980b9;
}
.btn-outline {
- background-color: transparent;
- border: 2px solid #3498db;
- color: #3498db;
+ background-color: transparent;
+ border: 2px solid #3498db;
+ color: #3498db;
}
.btn-outline:hover {
- background-color: #3498db;
- color: #fff;
+ background-color: #3498db;
+ color: #fff;
}
-
-input, select, textarea {
- width: 100%;
- padding: 0.75rem;
- border: 1px solid #ddd;
- border-radius: 5px;
- margin-bottom: 1rem;
- font-size: 1rem;
+input,
+select,
+textarea {
+ width: 100%;
+ padding: 0.75rem;
+ border: 1px solid #ddd;
+ border-radius: 5px;
+ font-size: 1rem;
}
-input:focus, select:focus, textarea:focus {
- outline: none;
- border-color: #3498db;
- box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
+input:focus,
+select:focus,
+textarea:focus {
+ outline: none;
+ border-color: #3498db;
+ box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}
-
table {
- width: 100%;
- border-collapse: collapse;
- margin-bottom: 2rem;
+ width: 100%;
+ border-collapse: collapse;
}
-table th, table td {
- padding: 1rem;
- border: 1px solid #ddd;
- text-align: left;
+table th,
+table td {
+ padding: 1rem;
+ border: 1px solid #ddd;
+ text-align: left;
}
table th {
- background-color: #f4f7f9;
- font-weight: bold;
+ background-color: #f4f7f9;
+ font-weight: bold;
}
table tr:nth-child(even) {
- background-color: #f9f9f9;
+ background-color: #f9f9f9;
}
-
.container {
- max-width: 1200px;
- margin: 0 auto;
- padding: 0 2rem;
+ max-width: 1200px;
+ margin: 0 auto;
+ padding: 0 2rem;
}
.row {
- display: flex;
- flex-wrap: wrap;
- margin-left: -1rem;
- margin-right: -1rem;
+ display: flex;
+ flex-wrap: wrap;
+ margin-left: -1rem;
+ margin-right: -1rem;
}
.col {
- flex: 1;
- padding: 1rem;
+ flex: 1;
+ padding: 1rem;
}
-.col-2 { flex: 0 0 16.66%; }
-.col-3 { flex: 0 0 25%; }
-.col-4 { flex: 0 0 33.33%; }
-.col-6 { flex: 0 0 50%; }
-.col-12 { flex: 0 0 100%; }
-
+.col-2 {
+ flex: 0 0 16.66%;
+}
+.col-3 {
+ flex: 0 0 25%;
+}
+.col-4 {
+ flex: 0 0 33.33%;
+}
+.col-6 {
+ flex: 0 0 50%;
+}
+.col-12 {
+ flex: 0 0 100%;
+}
.flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
}
.flex-center {
- display: flex;
- justify-content: center;
- align-items: center;
+ display: flex;
+ justify-content: center;
+ align-items: center;
}
.flex-column {
- display: flex;
- flex-direction: column;
+ display: flex;
+ flex-direction: column;
}
-
-.mt-1 { margin-top: 1rem; }
-.mt-2 { margin-top: 2rem; }
-.mb-1 { margin-bottom: 1rem; }
-.mb-2 { margin-bottom: 2rem; }
-.p-1 { padding: 1rem; }
-.p-2 { padding: 2rem; }
-
+.mt-1 {
+ margin-top: 1rem;
+}
+.mt-2 {
+ margin-top: 2rem;
+}
+.mb-1 {
+ margin-bottom: 1rem;
+}
+.mb-2 {
+ margin-bottom: 2rem;
+}
+.p-1 {
+ padding: 1rem;
+}
+.p-2 {
+ padding: 2rem;
+}
.card {
- background-color: #fff;
- padding: 1.5rem;
- border: 1px solid #ddd;
- border-radius: 8px;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
- transition: box-shadow 0.3s ease;
+ background-color: #fff;
+ padding: 1.5rem;
+ border: 1px solid #ddd;
+ border-radius: 8px;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+ transition: box-shadow 0.3s ease;
}
.card:hover {
- box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}
-
.fade-in {
- animation: fadeIn 1s ease-in forwards;
+ animation: fadeIn 1s ease-in forwards;
}
@keyframes fadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
}
-
@media (max-width: 768px) {
- .main {
- width: 95%;
- }
+ .main {
+ width: 95%;
+ }
- h1 {
- font-size: 2rem;
- }
+ h1 {
+ font-size: 2rem;
+ }
- p {
- font-size: 0.9rem;
- }
+ p {
+ font-size: 0.9rem;
+ }
- .row {
- flex-direction: column;
- }
+ .row {
+ flex-direction: column;
+ }
- .col {
- flex: 1 0 100%;
- }
+ .col {
+ flex: 1 0 100%;
+ }
}
-
body.dark-mode {
- background-color: #222;
- color: #f4f4f4;
+ background-color: #222;
+ color: #f4f4f4;
}
body.dark-mode a {
- color: #3498db;
+ color: #3498db;
}
body.dark-mode .card {
- background-color: #333;
- color: #f4f4f4;
+ background-color: #333;
+ color: #f4f4f4;
}
-body.dark-mode table th, body.dark-mode table td {
- border-color: #444;
+body.dark-mode table th,
+body.dark-mode table td {
+ border-color: #444;
}
-
.spinner {
- border: 4px solid #f3f3f3;
- border-radius: 50%;
- border-top: 4px solid #3498db;
- width: 40px;
- height: 40px;
- animation: spin 2s linear infinite;
+ border: 4px solid #f3f3f3;
+ border-radius: 50%;
+ border-top: 4px solid #3498db;
+ width: 40px;
+ height: 40px;
+ animation: spin 2s linear infinite;
}
@keyframes spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(360deg); }
+ 0% {
+ transform: rotate(0deg);
+ }
+ 100% {
+ transform: rotate(360deg);
+ }
}
diff --git a/webiu-ui/src/app/components/navbar/navbar.component.scss b/webiu-ui/src/app/components/navbar/navbar.component.scss
index fec22532..c8281d41 100644
--- a/webiu-ui/src/app/components/navbar/navbar.component.scss
+++ b/webiu-ui/src/app/components/navbar/navbar.component.scss
@@ -74,6 +74,9 @@
.navbar__menu__items:hover {
background: var(--blue, #2f80ed);
color: #fff;
+ p {
+ color: #fff;
+ }
}
.navbar__menu__items:hover img {
diff --git a/webiu-ui/src/app/components/profile-card/profile-card.component.scss b/webiu-ui/src/app/components/profile-card/profile-card.component.scss
index 69d3ea72..b9c6a4a9 100644
--- a/webiu-ui/src/app/components/profile-card/profile-card.component.scss
+++ b/webiu-ui/src/app/components/profile-card/profile-card.component.scss
@@ -1,80 +1,80 @@
.profile-box {
- display: flex;
- border: solid 1px #e0e0e0;
- box-shadow: 10px 10px 30px 10px #0505051a;
- border-radius: 10px;
- width: 100%;
- max-width: 350px;
- max-height: 650px;
- min-height: 300px;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- text-align: center;
+ display: flex;
+ border: solid 1px #e0e0e0;
+ box-shadow: 10px 10px 30px 10px #0505051a;
+ border-radius: 10px;
+ width: 100%;
+ max-width: 350px;
+ min-height: 300px;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ text-align: center;
+ padding: 20px 0;
}
.profile-img {
- width: 40%;
- height: 40%;
- border-radius: 50%;
- border: solid 0.2px;
+ width: 40%;
+ height: 40%;
+ border-radius: 50%;
+ border: solid 0.2px;
}
.profile-info {
- display: flex;
- width: 100%;
- gap: 10%;
- justify-content: center;
- margin-top: 10px;
+ display: flex;
+ width: 100%;
+ gap: 10%;
+ justify-content: center;
+ margin-top: 10px;
}
.profile-github {
- display: flex;
- align-items: center;
- gap: 10px;
- border-radius: 5px;
- background: var(--Gray-6, #eeecec);
- padding: 8px 12px;
- justify-content: center;
- margin-top: 5%;
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ border-radius: 5px;
+ background: var(--Gray-6, #eeecec);
+ padding: 8px 12px;
+ justify-content: center;
+ margin-top: 5%;
}
.github-icon {
- display: flex;
- justify-content: center;
- align-items: center;
+ display: flex;
+ justify-content: center;
+ align-items: center;
}
.github-username {
- display: flex;
- align-items: center;
- color: black;
+ display: flex;
+ align-items: center;
+ color: black;
}
/* Media Queries */
@media (max-width: 1200px) {
- .contributers-context {
- grid-template-columns: repeat(3, 1fr);
- }
- .contributors-main {
- margin-left: 15%;
- }
- .box {
- width: 100%;
- height: 100%;
- }
+ .contributers-context {
+ grid-template-columns: repeat(3, 1fr);
+ }
+ .contributors-main {
+ margin-left: 15%;
+ }
+ .box {
+ width: 100%;
+ height: 100%;
+ }
}
@media (max-width: 992px) {
- .box {
- width: 80%;
- height: 80%;
- }
+ .box {
+ width: 80%;
+ height: 80%;
+ }
}
@media (max-width: 500px) {
- .box {
- width: 70%;
- height: 70%;
- }
+ .box {
+ width: 70%;
+ height: 70%;
+ }
}
diff --git a/webiu-ui/src/app/page/contributors/contributors.component.scss b/webiu-ui/src/app/page/contributors/contributors.component.scss
index d316c03c..15a36230 100644
--- a/webiu-ui/src/app/page/contributors/contributors.component.scss
+++ b/webiu-ui/src/app/page/contributors/contributors.component.scss
@@ -15,16 +15,18 @@
.search-container {
width: 100%;
- margin-bottom: 24px;
.search-wrapper {
display: flex;
+ align-items: center;
+ justify-content: center;
gap: 12px;
width: 100%;
+ margin-bottom: 2rem;
.search-input {
flex: 1;
- padding: 16px 24px;
+ padding: 14px 24px;
border-radius: 12px;
border: 1px solid #e5e5e5;
background: #f5f5f5;
@@ -81,6 +83,7 @@
.repository-select {
background-color: #e9f6ff;
+ max-width: 300px;
}
select {
@@ -155,7 +158,6 @@
width: 80px;
height: 80px;
border-radius: 50%;
- margin-bottom: 16px;
}
.profile-info {
@@ -168,7 +170,6 @@
.contribution-count {
color: var(--gray-900);
opacity: 0.8;
- margin-bottom: 12px;
font-size: 14px;
}
diff --git a/webiu-ui/src/styles.scss b/webiu-ui/src/styles.scss
index 61f9e6be..161bb28e 100644
--- a/webiu-ui/src/styles.scss
+++ b/webiu-ui/src/styles.scss
@@ -1,22 +1,18 @@
-
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
-
body {
font-family: "Poppins", sans-serif;
- font-size: 16px;
+ font-size: 16px;
line-height: 1.6;
- background-color: #f9f9f9;
- color: #333;
+ color: #333;
width: 100%;
overflow-x: hidden;
}
-
:root {
--primary-color: #3498db;
--secondary-color: #2ecc71;
@@ -33,8 +29,7 @@ body {
--spacing: 16px;
}
-
-[data-theme='dark'] {
+[data-theme="dark"] {
--primary-color: #2980b9;
--secondary-color: #27ae60;
--font-color-dark: #f9f9f9;
@@ -43,19 +38,20 @@ body {
color: var(--font-color-dark);
}
-
-h1, h2, h3, h4, h5, h6 {
- margin-bottom: 1.5rem;
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
font-weight: 700;
color: var(--font-color-dark);
}
p {
- margin-bottom: 1rem;
color: var(--font-color-dark);
}
-/* Links */
a {
color: var(--primary-color);
text-decoration: none;
@@ -66,27 +62,61 @@ a:hover {
filter: brightness(0.9);
}
-
-
-.mt-1 { margin-top: 8px; }
-.mt-2 { margin-top: 16px; }
-.mt-3 { margin-top: 24px; }
-.mb-1 { margin-bottom: 8px; }
-.mb-2 { margin-bottom: 16px; }
-.mb-3 { margin-bottom: 24px; }
-.p-1 { padding: 8px; }
-.p-2 { padding: 16px; }
-.p-3 { padding: 24px; }
-.text-center { text-align: center; }
-.text-right { text-align: right; }
-.text-left { text-align: left; }
-.flex { display: flex; }
-.flex-column { display: flex; flex-direction: column; }
-.justify-center { justify-content: center; }
-.align-center { align-items: center; }
-.w-100 { width: 100%; }
-.h-100 { height: 100%; }
-
+.mt-1 {
+ margin-top: 8px;
+}
+.mt-2 {
+ margin-top: 16px;
+}
+.mt-3 {
+ margin-top: 24px;
+}
+.mb-1 {
+ margin-bottom: 8px;
+}
+.mb-2 {
+ margin-bottom: 16px;
+}
+.mb-3 {
+ margin-bottom: 24px;
+}
+.p-1 {
+ padding: 8px;
+}
+.p-2 {
+ padding: 16px;
+}
+.p-3 {
+ padding: 24px;
+}
+.text-center {
+ text-align: center;
+}
+.text-right {
+ text-align: right;
+}
+.text-left {
+ text-align: left;
+}
+.flex {
+ display: flex;
+}
+.flex-column {
+ display: flex;
+ flex-direction: column;
+}
+.justify-center {
+ justify-content: center;
+}
+.align-center {
+ align-items: center;
+}
+.w-100 {
+ width: 100%;
+}
+.h-100 {
+ height: 100%;
+}
.grid {
display: grid;
@@ -109,26 +139,28 @@ a:hover {
grid-template-columns: auto;
}
-
-input, textarea, select {
+input,
+textarea,
+select {
font-family: "Poppins", sans-serif;
padding: 0.75rem;
border: 1px solid #ddd;
border-radius: 5px;
width: 100%;
- margin-bottom: 1rem;
}
-input:focus, textarea:focus, select:focus {
+input:focus,
+textarea:focus,
+select:focus {
border-color: var(--primary-color);
outline: none;
}
-
-button, .btn {
+button,
+.btn {
display: flex;
- justify-content: center;
- align-items: center;
+ justify-content: center;
+ align-items: center;
background-color: var(--primary-color);
color: var(--font-color-light);
padding: 0.75rem 1.5rem;
@@ -138,26 +170,27 @@ button, .btn {
transition: background-color 0.3s ease;
}
-button:hover, .btn:hover {
+button:hover,
+.btn:hover {
background-color: var(--hover-color);
}
-button i, .btn i {
+button i,
+.btn i {
display: inline-block;
font-size: 1.25rem;
vertical-align: middle;
}
-
-button .icon, .btn .icon {
- margin-right: 8px;
+button .icon,
+.btn .icon {
+ margin-right: 8px;
}
-
nav {
display: flex;
- justify-content: center;
- align-items: center;
+ justify-content: center;
+ align-items: center;
background-color: var(--primary-color);
padding: 1rem;
}
@@ -169,7 +202,6 @@ nav ul {
margin: 0;
}
-
nav ul li a {
color: var(--font-color-light);
text-decoration: none;
@@ -187,32 +219,32 @@ nav ul li a:hover {
color: var(--font-color-light);
}
-
@media (max-width: 768px) {
body {
font-size: var(--font-size-sm);
}
-
+
h1 {
font-size: 1.75rem;
}
-
+
p {
font-size: 0.9rem;
}
-
- button, .btn {
+
+ button,
+ .btn {
font-size: var(--font-size-sm);
padding: 0.5rem 1rem;
}
nav ul {
- flex-direction: column;
+ flex-direction: column;
gap: 1rem;
}
-
+
nav ul li a {
font-size: var(--font-size-sm);
padding: 0.5rem 1rem;
}
-}
\ No newline at end of file
+}
From 9e018081b8268df48fdbd4b214fedf05dca6095f Mon Sep 17 00:00:00 2001
From: rajutkarsh07
Date: Tue, 12 Nov 2024 13:15:21 +0530
Subject: [PATCH 05/12] fixed ci
---
.github/workflows/frontend-ci.yml | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml
index 5cf9f243..b282248f 100644
--- a/.github/workflows/frontend-ci.yml
+++ b/.github/workflows/frontend-ci.yml
@@ -7,8 +7,8 @@ on:
branches: [feature/webiu-2024]
jobs:
- build-and-deploy:
- name: Build, Test, and Deploy Angular (webiu-ui)
+ build-webiu-ui:
+ name: Build and Test Angular (webiu-ui)
runs-on: ubuntu-latest
steps:
@@ -20,6 +20,16 @@ jobs:
with:
node-version: '20'
+ - name: Checkout target branch
+ uses: actions/checkout@v4
+ with:
+ ref: feature/webiu-2024
+
+ - name: Fetch pull request changes
+ run: |
+ git fetch origin +refs/pull/${{ github.event.pull_request.number }}/merge:pr
+ git checkout pr
+
- name: Install Angular CLI
run: npm install -g @angular/cli
@@ -31,17 +41,9 @@ jobs:
- name: Build Angular App
run: |
cd webiu-ui
- ng build --output-path=../docs --base-href="/Webiu/"
+ npm run build
- name: Run Angular Tests
- env:
- CHROME_BIN: google-chrome
- run: |
- cd webiu-ui
- ng test --watch=false --browsers=ChromeHeadless --no-sandbox
-
- - name: Deploy to GitHub Pages
- if: github.ref == 'refs/heads/feature/webiu-2024'
run: |
cd webiu-ui
- ngh --dir=../docs
+ npm test
From 12e90922389c46f37f9fdf3c3643b7a40e200da8 Mon Sep 17 00:00:00 2001
From: rajutkarsh07
Date: Tue, 12 Nov 2024 13:21:42 +0530
Subject: [PATCH 06/12] refactoring changes
---
.github/workflows/frontend-ci.yml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml
index b282248f..7a7b10b7 100644
--- a/.github/workflows/frontend-ci.yml
+++ b/.github/workflows/frontend-ci.yml
@@ -31,13 +31,20 @@ jobs:
git checkout pr
- name: Install Angular CLI
- run: npm install -g @angular/cli
+ run: |
+ cd webiu-ui
+ npm install -g @angular/cli
- name: Install dependencies
run: |
cd webiu-ui
npm install
+ - name: Install Chrome
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y google-chrome-stable
+
- name: Build Angular App
run: |
cd webiu-ui
@@ -47,3 +54,4 @@ jobs:
run: |
cd webiu-ui
npm test
+ npm test -- --browsers=ChromeHeadless --watch=false
From f8924659dfa373ce8228e8755a4d72bcea2bb169 Mon Sep 17 00:00:00 2001
From: rajutkarsh07
Date: Tue, 12 Nov 2024 13:25:10 +0530
Subject: [PATCH 07/12] refactor
---
.github/workflows/frontend-ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml
index 7a7b10b7..c50a4d2a 100644
--- a/.github/workflows/frontend-ci.yml
+++ b/.github/workflows/frontend-ci.yml
@@ -54,4 +54,4 @@ jobs:
run: |
cd webiu-ui
npm test
- npm test -- --browsers=ChromeHeadless --watch=false
+ npm test -- --browsers=ChromeHeadless --watch=false --no-sandbox
From f54ddcaf7756d70732c4c0604ec2dfe5e304eddc Mon Sep 17 00:00:00 2001
From: rajutkarsh07
Date: Tue, 12 Nov 2024 13:30:06 +0530
Subject: [PATCH 08/12] fix
---
.github/workflows/frontend-ci.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml
index c50a4d2a..aab8893b 100644
--- a/.github/workflows/frontend-ci.yml
+++ b/.github/workflows/frontend-ci.yml
@@ -53,5 +53,4 @@ jobs:
- name: Run Angular Tests
run: |
cd webiu-ui
- npm test
- npm test -- --browsers=ChromeHeadless --watch=false --no-sandbox
+ npm test -- --browsers=ChromeHeadless --watch=false
From 2142ee7c0de25bfaf0c04540c70bcab8f0e92ead Mon Sep 17 00:00:00 2001
From: Akshay Waghmare
Date: Thu, 14 Nov 2024 20:11:32 +0530
Subject: [PATCH 09/12] Implemented auth system with user model, controller,
routes, and tests
---
webiu-server/.env.example | 5 +
webiu-server/__tests__/authController.test.js | 176 +++
webiu-server/app.js | 13 +-
webiu-server/config/db.js | 16 +
webiu-server/controllers/authController.js | 103 ++
webiu-server/docs/DOCUMENTATION.md | 131 ++
webiu-server/middlewares/authMiddleware.js | 19 +
webiu-server/models/User.js | 22 +
webiu-server/package-lock.json | 1399 +++++++++++++++--
webiu-server/package.json | 7 +-
webiu-server/routes/authRoutes.js | 9 +
webiu-server/server.js | 2 +-
webiu-server/utils/jwt.js | 10 +
13 files changed, 1821 insertions(+), 91 deletions(-)
create mode 100644 webiu-server/.env.example
create mode 100644 webiu-server/__tests__/authController.test.js
create mode 100644 webiu-server/config/db.js
create mode 100644 webiu-server/controllers/authController.js
create mode 100644 webiu-server/docs/DOCUMENTATION.md
create mode 100644 webiu-server/middlewares/authMiddleware.js
create mode 100644 webiu-server/models/User.js
create mode 100644 webiu-server/routes/authRoutes.js
create mode 100644 webiu-server/utils/jwt.js
diff --git a/webiu-server/.env.example b/webiu-server/.env.example
new file mode 100644
index 00000000..2a6beca7
--- /dev/null
+++ b/webiu-server/.env.example
@@ -0,0 +1,5 @@
+PORT=5100
+MONGODB_URI=mongodb://localhost:27017/webiu
+JWT_SECRET=your_jwt_secret
+GITHUB_ACCESS_TOKEN=your_github_access_token_add_here
+
diff --git a/webiu-server/__tests__/authController.test.js b/webiu-server/__tests__/authController.test.js
new file mode 100644
index 00000000..1517edfc
--- /dev/null
+++ b/webiu-server/__tests__/authController.test.js
@@ -0,0 +1,176 @@
+const request = require('supertest');
+const express = require('express');
+const User = require('../models/User');
+const { signToken } = require('../utils/jwt');
+const authController = require('../controllers/authController');
+
+jest.mock('../utils/jwt', () => ({
+ signToken: jest.fn().mockReturnValue('mockedToken'),
+}));
+
+const app = express();
+app.use(express.json());
+app.post('/register', authController.register);
+app.post('/login', authController.login);
+
+describe('Auth Controller Tests', () => {
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ // Test successful user registration
+ it('should register a user successfully', async () => {
+ const mockUser = {
+ _id: '60d6f96a9b1f8f001c8f27c5',
+ name: 'John Doe',
+ email: 'johndoe@example.com',
+ password: 'password123',
+ };
+
+ User.findOne = jest.fn().mockResolvedValue(null);
+ User.prototype.save = jest.fn().mockResolvedValue(mockUser);
+
+ const response = await request(app).post('/register').send({
+ name: 'John Doe',
+ email: 'johndoe@example.com',
+ password: 'password123',
+ confirmPassword: 'password123',
+ });
+
+ response.body.data.user.id = mockUser._id;
+
+ expect(response.status).toBe(201);
+ expect(response.body.status).toBe('success');
+ expect(response.body.data.user).toEqual({
+ id: mockUser._id,
+ name: mockUser.name,
+ email: mockUser.email,
+ });
+ expect(response.body.data.token).toBe('mockedToken');
+ });
+
+ // Test failed user registration - email already exists
+ it('should return an error when email already exists during registration', async () => {
+ const mockUser = {
+ _id: '60d6f96a9b1f8f001c8f27c5',
+ name: 'John Doe',
+ email: 'johndoe@example.com',
+ password: 'password123',
+ };
+
+ User.findOne = jest.fn().mockResolvedValue(mockUser);
+
+ const response = await request(app).post('/register').send({
+ name: 'John Doe',
+ email: 'johndoe@example.com',
+ password: 'password123',
+ confirmPassword: 'password123',
+ });
+
+ expect(response.status).toBe(400);
+ expect(response.body.status).toBe('error');
+ expect(response.body.message).toBe('User already exists');
+ });
+
+ // Test failed user registration - password mismatch
+ it('should return an error when passwords do not match', async () => {
+ const response = await request(app).post('/register').send({
+ name: 'John Doe',
+ email: 'johndoe@example.com',
+ password: 'password123',
+ confirmPassword: 'password456',
+ });
+
+ expect(response.status).toBe(400);
+ expect(response.body.status).toBe('error');
+ expect(response.body.message).toBe('Passwords do not match');
+ });
+
+ // Test successful user login
+ it('should login a user successfully', async () => {
+ const mockUser = {
+ _id: '60d6f96a9b1f8f001c8f27c5',
+ email: 'johndoe@example.com',
+ password: 'password123',
+ matchPassword: jest.fn().mockResolvedValue(true),
+ githubId: 'john-github',
+ };
+
+ User.findOne = jest.fn().mockResolvedValue(mockUser);
+
+ const response = await request(app).post('/login').send({
+ email: 'johndoe@example.com',
+ password: 'password123',
+ });
+
+ expect(response.status).toBe(200);
+ expect(response.body.status).toBe('success');
+ expect(response.body.data.user).toEqual({
+ id: mockUser._id,
+ name: mockUser.name,
+ email: mockUser.email,
+ githubId: mockUser.githubId,
+ });
+ expect(response.body.data.token).toBe('mockedToken');
+ });
+
+ // Test failed user login - incorrect password
+ it('should return an error for incorrect password during login', async () => {
+ const mockUser = {
+ _id: '60d6f96a9b1f8f001c8f27c5',
+ email: 'johndoe@example.com',
+ password: 'password123',
+ matchPassword: jest.fn().mockResolvedValue(false),
+ };
+
+ User.findOne = jest.fn().mockResolvedValue(mockUser);
+
+ const response = await request(app).post('/login').send({
+ email: 'johndoe@example.com',
+ password: 'wrongPassword',
+ });
+
+ expect(response.status).toBe(401);
+ expect(response.body.status).toBe('error');
+ expect(response.body.message).toBe('Invalid email or password');
+ });
+
+ // Test failed user login - user not found
+ it('should return an error if user is not found during login', async () => {
+ User.findOne = jest.fn().mockResolvedValue(null);
+
+ const response = await request(app).post('/login').send({
+ email: 'nonexistentuser@example.com',
+ password: 'password123',
+ });
+
+ expect(response.status).toBe(401);
+ expect(response.body.status).toBe('error');
+ expect(response.body.message).toBe('User not found');
+ });
+
+ // Test failed user registration - invalid email format
+ it('should return an error for invalid email format during registration', async () => {
+ const response = await request(app).post('/register').send({
+ name: 'John Doe',
+ email: 'invalid-email',
+ password: 'password123',
+ confirmPassword: 'password123',
+ });
+
+ expect(response.status).toBe(400);
+ expect(response.body.status).toBe('error');
+ expect(response.body.message).toBe('Invalid email format');
+ });
+
+ // Test failed user login - missing fields
+ it('should return an error if required fields are missing during login', async () => {
+ const response = await request(app).post('/login').send({
+ email: 'johndoe@example.com',
+ });
+
+ expect(response.status).toBe(401);
+ expect(response.body.status).toBe('error');
+ expect(response.body.message).toBe('User not found');
+ });
+});
diff --git a/webiu-server/app.js b/webiu-server/app.js
index 9a474bbf..198ed829 100644
--- a/webiu-server/app.js
+++ b/webiu-server/app.js
@@ -3,15 +3,26 @@ const cookieParser = require('cookie-parser');
const cors = require('cors');
const contributorRoutes = require('./routes/contributorRoutes');
const projectRoutes = require('./routes/projectRoutes');
+const authRoutes = require('./routes/authRoutes')
+const connectDB = require('./config/db');
+
const app = express();
+connectDB();
app.use(cors());
app.use(express.json());
app.use(cookieParser());
-app.use('/api/v1/project', projectRoutes);
+// Route for API-testing
+app.get('/api/v1/test', (req, res) => {
+ res.status(200).json({ message: 'Server is running and working fine!' });
+});
+app.use('/api/v1/project', projectRoutes);
app.use('/api/contributor',contributorRoutes);
+app.use('/api/v1/auth',authRoutes)
+
+
module.exports = app;
diff --git a/webiu-server/config/db.js b/webiu-server/config/db.js
new file mode 100644
index 00000000..b86bca94
--- /dev/null
+++ b/webiu-server/config/db.js
@@ -0,0 +1,16 @@
+const mongoose = require('mongoose');
+require('dotenv').config();
+const colors = require('colors');
+
+
+const connectDB = async () => {
+ try {
+ await mongoose.connect(process.env.MONGODB_URI);
+ console.log('MongoDB connection established successfully.'.green.bold.underline);
+ } catch (error) {
+ console.error('Error: MongoDB connection failed. Please check the database server and configuration.'.red.bold.underline);
+ process.exit(1);
+ }
+};
+
+module.exports = connectDB;
diff --git a/webiu-server/controllers/authController.js b/webiu-server/controllers/authController.js
new file mode 100644
index 00000000..8e4acfb8
--- /dev/null
+++ b/webiu-server/controllers/authController.js
@@ -0,0 +1,103 @@
+// controllers/authController.js
+const User = require('../models/User');
+const { signToken } = require('../utils/jwt');
+
+const emailRegex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;
+
+
+const register = async (req, res) => {
+ const { name, email, password, confirmPassword, githubId } = req.body;
+
+ if (!emailRegex.test(email)) {
+ return res.status(400).json({
+ status: 'error',
+ message: 'Invalid email format',
+ });
+ }
+
+ if (password !== confirmPassword) {
+ return res.status(400).json({
+ status: 'error',
+ message: 'Passwords do not match',
+ });
+ }
+
+ try {
+ const existingUser = await User.findOne({ email });
+ if (existingUser) {
+ return res.status(400).json({
+ status: 'error',
+ message: 'User already exists',
+ });
+ }
+
+ const user = new User({ name, email, password, githubId });
+ await user.save();
+
+ const token = signToken(user);
+
+ res.status(201).json({
+ status: 'success',
+ message: 'User registered successfully',
+ data: {
+ user: {
+ id: user._id,
+ name: user.name,
+ email: user.email,
+ },
+ token,
+ },
+ });
+ } catch (error) {
+ res.status(500).json({
+ status: 'error',
+ message: error.message,
+ });
+ }
+};
+
+
+const login = async (req, res) => {
+ const { email, password } = req.body;
+
+ try {
+ const user = await User.findOne({ email });
+
+ if(!user){
+ return res.status(401).json({
+ status: 'error',
+ message: 'User not found',
+ });
+ }
+ if (!user || !(await user.matchPassword(password))) {
+ return res.status(401).json({
+ status: 'error',
+ message: 'Invalid email or password',
+ });
+ }
+
+
+ const token = signToken(user);
+
+ res.status(200).json({
+ status: 'success',
+ message: 'Login successful',
+ data: {
+ user: {
+ id: user._id,
+ name: user.name,
+ email: user.email,
+ githubId:user.githubId
+ },
+ token,
+ },
+ });
+ } catch (error) {
+ res.status(500).json({
+ status: 'error',
+ message: error.message,
+ });
+ }
+};
+
+module.exports = { register, login };
diff --git a/webiu-server/docs/DOCUMENTATION.md b/webiu-server/docs/DOCUMENTATION.md
new file mode 100644
index 00000000..c8a971da
--- /dev/null
+++ b/webiu-server/docs/DOCUMENTATION.md
@@ -0,0 +1,131 @@
+
+# API Documentation for Webiu
+
+## Authentication Endpoints
+
+### 1. **User Registration**
+
+- **Endpoint**: `POST /api/v1/auth/register`
+- **Description**: Registers a new user with the provided credentials (name, email, password, confirmPassword, githubId).
+- **Request Body**:
+ ```json
+ {
+ "name": "John Doe",
+ "email": "johndoe@example.com",
+ "password": "password123",
+ "confirmPassword": "password123",
+ "githubId": "johndoeGitHub"
+ }
+ ```
+
+- **Validation**:
+ - **Email format**: The email must match the valid email pattern (`example@domain.com`).
+ - **Password match**: The password and confirmPassword must be identical.
+
+- **Responses**:
+ - **201 Created**: On successful registration.
+ ```json
+ {
+ "status": "success",
+ "message": "User registered successfully",
+ "data": {
+ "user": {
+ "id": "userId123",
+ "name": "John Doe",
+ "email": "johndoe@example.com"
+ },
+ "token": "JWT_Token_Here"
+ }
+ }
+ ```
+
+ - **400 Bad Request**: If the email format is invalid or passwords do not match.
+ ```json
+ {
+ "status": "error",
+ "message": "Invalid email format"
+ }
+ ```
+ OR
+ ```json
+ {
+ "status": "error",
+ "message": "Passwords do not match"
+ }
+ ```
+
+ - **400 Bad Request**: If the user already exists with the given email.
+ ```json
+ {
+ "status": "error",
+ "message": "User already exists"
+ }
+ ```
+
+ - **500 Internal Server Error**: If an unexpected error occurs.
+ ```json
+ {
+ "status": "error",
+ "message": "Error message here"
+ }
+ ```
+
+### 2. **User Login**
+
+- **Endpoint**: `POST /api/v1/auth/login`
+- **Description**: Logs in an existing user with the provided email and password.
+- **Request Body**:
+ ```json
+ {
+ "email": "johndoe@example.com",
+ "password": "password123"
+ }
+ ```
+
+- **Validation**:
+ - **Email format**: The email must match the valid email pattern (`example@domain.com`).
+
+- **Responses**:
+ - **200 OK**: On successful login.
+ ```json
+ {
+ "status": "success",
+ "message": "Login successful",
+ "data": {
+ "user": {
+ "id": "userId123",
+ "name": "John Doe",
+ "email": "johndoe@example.com",
+ "githubId": "johndoeGitHub"
+ },
+ "token": "JWT_Token_Here"
+ }
+ }
+ ```
+
+ - **400 Bad Request**: If the email format is invalid.
+ ```json
+ {
+ "status": "error",
+ "message": "Invalid email format"
+ }
+ ```
+
+ - **401 Unauthorized**: If the user does not exist or if the password is incorrect.
+ ```json
+ {
+ "status": "error",
+ "message": "Invalid email or password"
+ }
+ ```
+
+ - **500 Internal Server Error**: If an unexpected error occurs.
+ ```json
+ {
+ "status": "error",
+ "message": "Error message here"
+ }
+ ```
+
+
+
diff --git a/webiu-server/middlewares/authMiddleware.js b/webiu-server/middlewares/authMiddleware.js
new file mode 100644
index 00000000..cb06476e
--- /dev/null
+++ b/webiu-server/middlewares/authMiddleware.js
@@ -0,0 +1,19 @@
+const jwt = require('jsonwebtoken');
+const User = require('../models/User');
+
+const authMiddleware = async (req, res, next) => {
+ const token = req.header('Authorization').replace('Bearer ', '');
+ if (!token) {
+ return res.status(401).json({ message: 'Not authorized' });
+ }
+
+ try {
+ const decoded = jwt.verify(token, process.env.JWT_SECRET);
+ req.user = await User.findById(decoded.id);
+ next();
+ } catch (error) {
+ res.status(401).json({ message: 'Token is not valid' });
+ }
+};
+
+module.exports = authMiddleware;
diff --git a/webiu-server/models/User.js b/webiu-server/models/User.js
new file mode 100644
index 00000000..c109ce95
--- /dev/null
+++ b/webiu-server/models/User.js
@@ -0,0 +1,22 @@
+const mongoose = require('mongoose');
+const bcrypt = require('bcryptjs');
+
+const userSchema = new mongoose.Schema({
+ name: { type: String, required: true },
+ email: { type: String, required: true, unique: true },
+ password: { type: String, required: true },
+ githubId: { type: String },
+}, { timestamps: true });
+
+// Hash the password before saving
+userSchema.pre('save', async function(next) {
+ if (!this.isModified('password')) return next();
+ this.password = await bcrypt.hash(this.password, 10);
+ next();
+});
+
+userSchema.methods.matchPassword = async function(password) {
+ return await bcrypt.compare(password, this.password);
+};
+
+module.exports = mongoose.model('User', userSchema);
diff --git a/webiu-server/package-lock.json b/webiu-server/package-lock.json
index 9bb2b3fc..3fcaf981 100644
--- a/webiu-server/package-lock.json
+++ b/webiu-server/package-lock.json
@@ -10,10 +10,15 @@
"license": "ISC",
"dependencies": {
"axios": "^1.7.2",
+ "bcryptjs": "^2.4.3",
+ "chalk": "^5.3.0",
+ "colors": "^1.4.0",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
- "express": "^4.19.2",
+ "express": "^4.21.1",
+ "jsonwebtoken": "^9.0.2",
+ "mongoose": "^8.8.1",
"nodemon": "^3.1.4",
"path": "^0.12.7"
},
@@ -671,6 +676,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/@jest/console/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,
+ "license": "MIT",
+ "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/@jest/console/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@jest/console/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/@jest/core": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz",
@@ -718,6 +763,46 @@
}
}
},
+ "node_modules/@jest/core/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,
+ "license": "MIT",
+ "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/@jest/core/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@jest/core/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/@jest/environment": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz",
@@ -833,6 +918,46 @@
}
}
},
+ "node_modules/@jest/reporters/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,
+ "license": "MIT",
+ "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/@jest/reporters/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@jest/reporters/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/@jest/schemas": {
"version": "29.6.3",
"resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
@@ -915,6 +1040,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/@jest/transform/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,
+ "license": "MIT",
+ "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/@jest/transform/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@jest/transform/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/@jest/types": {
"version": "29.6.3",
"resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",
@@ -932,6 +1097,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/@jest/types/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,
+ "license": "MIT",
+ "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/@jest/types/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@jest/types/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
@@ -980,6 +1185,15 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@mongodb-js/saslprep": {
+ "version": "1.1.9",
+ "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.9.tgz",
+ "integrity": "sha512-tVkljjeEaAhCqTzajSdgbQ6gE6f3oneVwa3iXR6csiEwXXOFsiC6Uh9iAjAhXPtqa/XMDHWjjeNH/77m/Yq2dw==",
+ "license": "MIT",
+ "dependencies": {
+ "sparse-bitfield": "^3.0.3"
+ }
+ },
"node_modules/@sinclair/typebox": {
"version": "0.27.8",
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
@@ -1093,6 +1307,21 @@
"integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==",
"dev": true
},
+ "node_modules/@types/webidl-conversions": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz",
+ "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==",
+ "license": "MIT"
+ },
+ "node_modules/@types/whatwg-url": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz",
+ "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/webidl-conversions": "*"
+ }
+ },
"node_modules/@types/yargs": {
"version": "17.0.33",
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz",
@@ -1227,6 +1456,46 @@
"@babel/core": "^7.8.0"
}
},
+ "node_modules/babel-jest/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,
+ "license": "MIT",
+ "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/babel-jest/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/babel-jest/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/babel-plugin-istanbul": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz",
@@ -1330,6 +1599,12 @@
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
+ "node_modules/bcryptjs": {
+ "version": "2.4.3",
+ "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz",
+ "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==",
+ "license": "MIT"
+ },
"node_modules/binary-extensions": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
@@ -1342,9 +1617,10 @@
}
},
"node_modules/body-parser": {
- "version": "1.20.2",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
- "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
+ "version": "1.20.3",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
+ "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
+ "license": "MIT",
"dependencies": {
"bytes": "3.1.2",
"content-type": "~1.0.5",
@@ -1354,7 +1630,7 @@
"http-errors": "2.0.0",
"iconv-lite": "0.4.24",
"on-finished": "2.4.1",
- "qs": "6.11.0",
+ "qs": "6.13.0",
"raw-body": "2.5.2",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
@@ -1425,6 +1701,21 @@
"node-int64": "^0.4.0"
}
},
+ "node_modules/bson": {
+ "version": "6.9.0",
+ "resolved": "https://registry.npmjs.org/bson/-/bson-6.9.0.tgz",
+ "integrity": "sha512-X9hJeyeM0//Fus+0pc5dSUMhhrrmWwQUtdavaQeF3Ta6m69matZkGWV/MrBcnwUeLC8W9kwwc2hfkZgUuCX3Ig==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=16.20.1"
+ }
+ },
+ "node_modules/buffer-equal-constant-time": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+ "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==",
+ "license": "BSD-3-Clause"
+ },
"node_modules/buffer-from": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
@@ -1435,6 +1726,7 @@
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
@@ -1496,42 +1788,17 @@
]
},
"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"
- },
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "license": "MIT",
"engines": {
- "node": ">=10"
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
- "node_modules/chalk/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/chalk/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/char-regex": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz",
@@ -1633,6 +1900,15 @@
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
+ "node_modules/colors": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
+ "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.1.90"
+ }
+ },
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -1673,6 +1949,7 @@
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
@@ -1747,12 +2024,52 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
- "node_modules/cross-spawn": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
- "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
- "dev": true,
- "dependencies": {
+ "node_modules/create-jest/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,
+ "license": "MIT",
+ "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/create-jest/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/create-jest/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "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==",
+ "dev": true,
+ "dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
@@ -1765,6 +2082,7 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
"dependencies": {
"ms": "2.0.0"
}
@@ -1820,6 +2138,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
@@ -1828,6 +2147,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "license": "MIT",
"engines": {
"node": ">= 0.8",
"npm": "1.2.8000 || >= 1.4.16"
@@ -1865,6 +2185,7 @@
"version": "16.4.5",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
"integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
+ "license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
@@ -1872,10 +2193,20 @@
"url": "https://dotenvx.com"
}
},
+ "node_modules/ecdsa-sig-formatter": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+ "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
- "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
},
"node_modules/electron-to-chromium": {
"version": "1.5.36",
@@ -1902,9 +2233,10 @@
"dev": true
},
"node_modules/encodeurl": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
- "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
@@ -1949,7 +2281,8 @@
"node_modules/escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
},
"node_modules/escape-string-regexp": {
"version": "2.0.0",
@@ -1977,6 +2310,7 @@
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
@@ -2030,36 +2364,37 @@
}
},
"node_modules/express": {
- "version": "4.19.2",
- "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
- "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
+ "version": "4.21.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz",
+ "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==",
+ "license": "MIT",
"dependencies": {
"accepts": "~1.3.8",
"array-flatten": "1.1.1",
- "body-parser": "1.20.2",
+ "body-parser": "1.20.3",
"content-disposition": "0.5.4",
"content-type": "~1.0.4",
- "cookie": "0.6.0",
+ "cookie": "0.7.1",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "2.0.0",
- "encodeurl": "~1.0.2",
+ "encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
- "finalhandler": "1.2.0",
+ "finalhandler": "1.3.1",
"fresh": "0.5.2",
"http-errors": "2.0.0",
- "merge-descriptors": "1.0.1",
+ "merge-descriptors": "1.0.3",
"methods": "~1.1.2",
"on-finished": "2.4.1",
"parseurl": "~1.3.3",
- "path-to-regexp": "0.1.7",
+ "path-to-regexp": "0.1.10",
"proxy-addr": "~2.0.7",
- "qs": "6.11.0",
+ "qs": "6.13.0",
"range-parser": "~1.2.1",
"safe-buffer": "5.2.1",
- "send": "0.18.0",
- "serve-static": "1.15.0",
+ "send": "0.19.0",
+ "serve-static": "1.16.2",
"setprototypeof": "1.2.0",
"statuses": "2.0.1",
"type-is": "~1.6.18",
@@ -2071,9 +2406,10 @@
}
},
"node_modules/express/node_modules/cookie": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
- "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",
+ "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
@@ -2111,12 +2447,13 @@
}
},
"node_modules/finalhandler": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
- "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
+ "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
+ "license": "MIT",
"dependencies": {
"debug": "2.6.9",
- "encodeurl": "~1.0.2",
+ "encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"on-finished": "2.4.1",
"parseurl": "~1.3.3",
@@ -2198,6 +2535,7 @@
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
@@ -2415,6 +2753,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "license": "MIT",
"dependencies": {
"depd": "2.0.0",
"inherits": "2.0.4",
@@ -2439,6 +2778,7 @@
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3"
},
@@ -2779,6 +3119,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/jest-circus/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,
+ "license": "MIT",
+ "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/jest-circus/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-circus/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-cli": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz",
@@ -2812,6 +3192,46 @@
}
}
},
+ "node_modules/jest-cli/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,
+ "license": "MIT",
+ "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/jest-cli/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-cli/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-config": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz",
@@ -2857,6 +3277,46 @@
}
}
},
+ "node_modules/jest-config/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,
+ "license": "MIT",
+ "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/jest-config/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-config/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-diff": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz",
@@ -2872,6 +3332,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/jest-diff/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,
+ "license": "MIT",
+ "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/jest-diff/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-diff/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-docblock": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz",
@@ -2900,6 +3400,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/jest-each/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,
+ "license": "MIT",
+ "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/jest-each/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-each/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-environment-node": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz",
@@ -2979,6 +3519,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/jest-matcher-utils/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,
+ "license": "MIT",
+ "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/jest-matcher-utils/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-matcher-utils/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-message-util": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz",
@@ -2999,6 +3579,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/jest-message-util/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,
+ "license": "MIT",
+ "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/jest-message-util/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-message-util/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-mock": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz",
@@ -3072,6 +3692,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/jest-resolve/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,
+ "license": "MIT",
+ "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/jest-resolve/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-resolve/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-runner": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz",
@@ -3104,6 +3764,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/jest-runner/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,
+ "license": "MIT",
+ "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/jest-runner/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-runner/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-runtime": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz",
@@ -3137,6 +3837,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/jest-runtime/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,
+ "license": "MIT",
+ "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/jest-runtime/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-runtime/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-snapshot": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz",
@@ -3165,7 +3905,47 @@
"semver": "^7.5.3"
},
"engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-snapshot/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,
+ "license": "MIT",
+ "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/jest-snapshot/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-snapshot/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
}
},
"node_modules/jest-util": {
@@ -3185,6 +3965,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/jest-util/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,
+ "license": "MIT",
+ "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/jest-util/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-util/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-validate": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz",
@@ -3214,6 +4034,46 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/jest-validate/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,
+ "license": "MIT",
+ "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/jest-validate/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-validate/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-watcher": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz",
@@ -3233,6 +4093,46 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/jest-watcher/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,
+ "license": "MIT",
+ "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/jest-watcher/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jest-watcher/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jest-worker": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz",
@@ -3321,6 +4221,64 @@
"node": ">=6"
}
},
+ "node_modules/jsonwebtoken": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
+ "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
+ "license": "MIT",
+ "dependencies": {
+ "jws": "^3.2.2",
+ "lodash.includes": "^4.3.0",
+ "lodash.isboolean": "^3.0.3",
+ "lodash.isinteger": "^4.0.4",
+ "lodash.isnumber": "^3.0.3",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.isstring": "^4.0.1",
+ "lodash.once": "^4.0.0",
+ "ms": "^2.1.1",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ }
+ },
+ "node_modules/jsonwebtoken/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/jwa": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
+ "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
+ "license": "MIT",
+ "dependencies": {
+ "buffer-equal-constant-time": "1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jws": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
+ "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
+ "license": "MIT",
+ "dependencies": {
+ "jwa": "^1.4.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/kareem": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.6.3.tgz",
+ "integrity": "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
"node_modules/kleur": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
@@ -3357,6 +4315,48 @@
"node": ">=8"
}
},
+ "node_modules/lodash.includes": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
+ "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isboolean": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
+ "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isinteger": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
+ "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isnumber": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
+ "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isstring": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.once": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
+ "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==",
+ "license": "MIT"
+ },
"node_modules/lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
@@ -3394,14 +4394,25 @@
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
+ "node_modules/memory-pager": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
+ "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
+ "license": "MIT"
+ },
"node_modules/merge-descriptors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
- "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
+ "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
"node_modules/merge-stream": {
"version": "2.0.0",
@@ -3434,6 +4445,7 @@
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "license": "MIT",
"bin": {
"mime": "cli.js"
},
@@ -3480,10 +4492,139 @@
"node": "*"
}
},
+ "node_modules/mongodb": {
+ "version": "6.10.0",
+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.10.0.tgz",
+ "integrity": "sha512-gP9vduuYWb9ZkDM546M+MP2qKVk5ZG2wPF63OvSRuUbqCR+11ZCAE1mOfllhlAG0wcoJY5yDL/rV3OmYEwXIzg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@mongodb-js/saslprep": "^1.1.5",
+ "bson": "^6.7.0",
+ "mongodb-connection-string-url": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=16.20.1"
+ },
+ "peerDependencies": {
+ "@aws-sdk/credential-providers": "^3.188.0",
+ "@mongodb-js/zstd": "^1.1.0",
+ "gcp-metadata": "^5.2.0",
+ "kerberos": "^2.0.1",
+ "mongodb-client-encryption": ">=6.0.0 <7",
+ "snappy": "^7.2.2",
+ "socks": "^2.7.1"
+ },
+ "peerDependenciesMeta": {
+ "@aws-sdk/credential-providers": {
+ "optional": true
+ },
+ "@mongodb-js/zstd": {
+ "optional": true
+ },
+ "gcp-metadata": {
+ "optional": true
+ },
+ "kerberos": {
+ "optional": true
+ },
+ "mongodb-client-encryption": {
+ "optional": true
+ },
+ "snappy": {
+ "optional": true
+ },
+ "socks": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/mongodb-connection-string-url": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.1.tgz",
+ "integrity": "sha512-XqMGwRX0Lgn05TDB4PyG2h2kKO/FfWJyCzYQbIhXUxz7ETt0I/FqHjUeqj37irJ+Dl1ZtU82uYyj14u2XsZKfg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/whatwg-url": "^11.0.2",
+ "whatwg-url": "^13.0.0"
+ }
+ },
+ "node_modules/mongoose": {
+ "version": "8.8.1",
+ "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.8.1.tgz",
+ "integrity": "sha512-l7DgeY1szT98+EKU8GYnga5WnyatAu+kOQ2VlVX1Mxif6A0Umt0YkSiksCiyGxzx8SPhGe9a53ND1GD4yVDrPA==",
+ "license": "MIT",
+ "dependencies": {
+ "bson": "^6.7.0",
+ "kareem": "2.6.3",
+ "mongodb": "~6.10.0",
+ "mpath": "0.9.0",
+ "mquery": "5.0.0",
+ "ms": "2.1.3",
+ "sift": "17.1.3"
+ },
+ "engines": {
+ "node": ">=16.20.1"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/mongoose"
+ }
+ },
+ "node_modules/mongoose/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/mpath": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
+ "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/mquery": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz",
+ "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "4.x"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/mquery/node_modules/debug": {
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+ "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/mquery/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
"node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
},
"node_modules/natural-compare": {
"version": "1.4.0",
@@ -3602,6 +4743,7 @@
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "license": "MIT",
"dependencies": {
"ee-first": "1.1.1"
},
@@ -3706,6 +4848,7 @@
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
@@ -3753,9 +4896,10 @@
"dev": true
},
"node_modules/path-to-regexp": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
- "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
+ "version": "0.1.10",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz",
+ "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==",
+ "license": "MIT"
},
"node_modules/picocolors": {
"version": "1.1.0",
@@ -3864,6 +5008,15 @@
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w=="
},
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/pure-rand": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz",
@@ -3881,11 +5034,12 @@
]
},
"node_modules/qs": {
- "version": "6.11.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
- "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
+ "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
+ "license": "BSD-3-Clause",
"dependencies": {
- "side-channel": "^1.0.4"
+ "side-channel": "^1.0.6"
},
"engines": {
"node": ">=0.6"
@@ -3898,6 +5052,7 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
@@ -3906,6 +5061,7 @@
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
+ "license": "MIT",
"dependencies": {
"bytes": "3.1.2",
"http-errors": "2.0.0",
@@ -4011,7 +5167,8 @@
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
},
"node_modules/semver": {
"version": "7.6.3",
@@ -4025,9 +5182,10 @@
}
},
"node_modules/send": {
- "version": "0.18.0",
- "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
- "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
+ "version": "0.19.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
+ "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
+ "license": "MIT",
"dependencies": {
"debug": "2.6.9",
"depd": "2.0.0",
@@ -4047,20 +5205,31 @@
"node": ">= 0.8.0"
}
},
+ "node_modules/send/node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/send/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
},
"node_modules/serve-static": {
- "version": "1.15.0",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
- "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
+ "version": "1.16.2",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
+ "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
+ "license": "MIT",
"dependencies": {
- "encodeurl": "~1.0.2",
+ "encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"parseurl": "~1.3.3",
- "send": "0.18.0"
+ "send": "0.19.0"
},
"engines": {
"node": ">= 0.8.0"
@@ -4085,7 +5254,8 @@
"node_modules/setprototypeof": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
- "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
},
"node_modules/shebang-command": {
"version": "2.0.0",
@@ -4125,6 +5295,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/sift": {
+ "version": "17.1.3",
+ "resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz",
+ "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==",
+ "license": "MIT"
+ },
"node_modules/signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
@@ -4176,6 +5352,15 @@
"source-map": "^0.6.0"
}
},
+ "node_modules/sparse-bitfield": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
+ "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
+ "license": "MIT",
+ "dependencies": {
+ "memory-pager": "^1.0.2"
+ }
+ },
"node_modules/sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
@@ -4198,6 +5383,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
@@ -4406,6 +5592,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
"engines": {
"node": ">=0.6"
}
@@ -4418,6 +5605,18 @@
"nodetouch": "bin/nodetouch.js"
}
},
+ "node_modules/tr46": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz",
+ "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==",
+ "license": "MIT",
+ "dependencies": {
+ "punycode": "^2.3.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
"node_modules/type-detect": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
@@ -4443,6 +5642,7 @@
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "license": "MIT",
"dependencies": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
@@ -4466,6 +5666,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
@@ -4552,6 +5753,28 @@
"makeerror": "1.0.12"
}
},
+ "node_modules/webidl-conversions": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
+ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-url": {
+ "version": "13.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz",
+ "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==",
+ "license": "MIT",
+ "dependencies": {
+ "tr46": "^4.1.1",
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
diff --git a/webiu-server/package.json b/webiu-server/package.json
index 4edab96a..27c66c3a 100644
--- a/webiu-server/package.json
+++ b/webiu-server/package.json
@@ -12,10 +12,15 @@
"license": "ISC",
"dependencies": {
"axios": "^1.7.2",
+ "bcryptjs": "^2.4.3",
+ "chalk": "^5.3.0",
+ "colors": "^1.4.0",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
- "express": "^4.19.2",
+ "express": "^4.21.1",
+ "jsonwebtoken": "^9.0.2",
+ "mongoose": "^8.8.1",
"nodemon": "^3.1.4",
"path": "^0.12.7"
},
diff --git a/webiu-server/routes/authRoutes.js b/webiu-server/routes/authRoutes.js
new file mode 100644
index 00000000..c85b03f4
--- /dev/null
+++ b/webiu-server/routes/authRoutes.js
@@ -0,0 +1,9 @@
+// routes/authRoutes.js
+const express = require('express');
+const { register, login } = require('../controllers/authController');
+const router = express.Router();
+
+router.post('/register', register);
+router.post('/login', login);
+
+module.exports = router;
diff --git a/webiu-server/server.js b/webiu-server/server.js
index dd7d0c36..ceabda7b 100644
--- a/webiu-server/server.js
+++ b/webiu-server/server.js
@@ -4,7 +4,7 @@ const path = require('path');
dotenv.config();
const app = require('./app');
-const PORT = process.env.PORT || 5000;
+const PORT = process.env.PORT || 5100;
const server = app.listen(PORT, () => {
console.log(`Server is listening at port ${PORT}`);
diff --git a/webiu-server/utils/jwt.js b/webiu-server/utils/jwt.js
new file mode 100644
index 00000000..cd30e9c7
--- /dev/null
+++ b/webiu-server/utils/jwt.js
@@ -0,0 +1,10 @@
+// utils/jwt.js
+const jwt = require('jsonwebtoken');
+
+const signToken = (user) => {
+ return jwt.sign({ id: user._id }, process.env.JWT_SECRET, {
+ expiresIn: '1h',
+ });
+};
+
+module.exports = { signToken };
From 5eb7b16c2725378df92bd3e1e87a0eb679cd5d92 Mon Sep 17 00:00:00 2001
From: utkarsh_raj <49344502+rajutkarsh07@users.noreply.github.com>
Date: Thu, 14 Nov 2024 23:18:33 +0530
Subject: [PATCH 10/12] Update server.js
---
webiu-server/server.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webiu-server/server.js b/webiu-server/server.js
index ceabda7b..dd7d0c36 100644
--- a/webiu-server/server.js
+++ b/webiu-server/server.js
@@ -4,7 +4,7 @@ const path = require('path');
dotenv.config();
const app = require('./app');
-const PORT = process.env.PORT || 5100;
+const PORT = process.env.PORT || 5000;
const server = app.listen(PORT, () => {
console.log(`Server is listening at port ${PORT}`);
From 5263b31e7b9b1e90873592a42317933da0090ac5 Mon Sep 17 00:00:00 2001
From: Saksham Gupta
Date: Mon, 18 Nov 2024 18:33:13 +0530
Subject: [PATCH 11/12] Dark Mode added
---
.../components/navbar/navbar.component.html | 12 +-
.../components/navbar/navbar.component.scss | 141 +++++++++++++++++-
.../app/components/navbar/navbar.component.ts | 13 +-
.../profile-card/profile-card.component.scss | 14 +-
.../projects-card.component.scss | 21 ++-
.../publications-card.component.scss | 6 +-
.../page/community/community.component.scss | 4 +-
.../contributors/contributors.component.scss | 24 +--
.../src/app/page/gsoc/gsoc.component.html | 2 +-
.../src/app/page/gsoc/gsoc.component.scss | 10 +-
.../app/page/projects/projects.component.scss | 2 +-
.../src/app/services/theme.service.spec.ts | 16 ++
webiu-ui/src/app/services/theme.service.ts | 31 ++++
webiu-ui/src/assets/c2silogo-dark_no_bg.png | Bin 0 -> 50443 bytes
webiu-ui/src/assets/gsoc_no_bg.png | Bin 0 -> 33369 bytes
webiu-ui/src/styles.scss | 103 +++++++++++--
16 files changed, 347 insertions(+), 52 deletions(-)
create mode 100644 webiu-ui/src/app/services/theme.service.spec.ts
create mode 100644 webiu-ui/src/app/services/theme.service.ts
create mode 100644 webiu-ui/src/assets/c2silogo-dark_no_bg.png
create mode 100644 webiu-ui/src/assets/gsoc_no_bg.png
diff --git a/webiu-ui/src/app/components/navbar/navbar.component.html b/webiu-ui/src/app/components/navbar/navbar.component.html
index d94e6ab7..5ea18965 100644
--- a/webiu-ui/src/app/components/navbar/navbar.component.html
+++ b/webiu-ui/src/app/components/navbar/navbar.component.html
@@ -1,5 +1,5 @@
-
+
-
+
\ No newline at end of file
diff --git a/webiu-ui/src/app/components/navbar/navbar.component.scss b/webiu-ui/src/app/components/navbar/navbar.component.scss
index c8281d41..b9b8e498 100644
--- a/webiu-ui/src/app/components/navbar/navbar.component.scss
+++ b/webiu-ui/src/app/components/navbar/navbar.component.scss
@@ -4,7 +4,7 @@
padding: 10px 50px;
justify-content: space-between;
align-items: center;
- background: var(--primary-white, #fff);
+ background: var(--navbar-bg);
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.15);
}
@@ -28,7 +28,7 @@
right: 20px;
align-items: flex-start;
width: auto;
- background: var(--primary-white, #fff);
+ background: var(--navbar-bg);
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.15);
padding: 10px;
border-radius: 8px;
@@ -43,7 +43,7 @@
padding: 7px 14px;
gap: 8px;
border-radius: 7px;
- background: var(--primary-white, #fff);
+ background: var(--primary-white, var(--navbar-bg));
cursor: pointer;
transition: all 0.2s;
text-align: center;
@@ -59,6 +59,7 @@
.navbar__menu__items p {
margin: 0;
line-height: 1;
+ color:var(--navbar-p);
}
/* Active state styling */
@@ -88,6 +89,139 @@
display: none;
}
+.sun-moon-toggle {
+ width: 46px;
+ height: 46px;
+ box-sizing: border-box;
+ padding: 12px;
+ background: none;
+ border: none;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ position: relative;
+ cursor: pointer;
+}
+
+.sun {
+ width: 50%;
+ height: 50%;
+ position: absolute;
+ pointer-events: none;
+ opacity: 0;
+ transform: scale(0.6) rotate(0deg);
+ transition: transform 0.3s ease-in, opacity 0.2s ease-in 0.1s;
+ background: radial-gradient(circle, rgba(0, 0, 0, 0) 50%, #fbbc05 50%);
+}
+
+.sun:before {
+ content: "";
+ position: absolute;
+ display: block;
+ width: 100%;
+ height: 100%;
+ background: radial-gradient(
+ circle,
+ #fbbc05 30%,
+ rgba(0, 0, 0, 0) 31%,
+ rgba(0, 0, 0, 0) 50%,
+ #fbbc05 51%
+ );
+ transform: rotate(45deg);
+}
+
+.sun.visible {
+ pointer-events: auto;
+ opacity: 1;
+ transform: scale(1) rotate(180deg);
+ transition: transform 0.3s ease-in, opacity 0.2s ease-in 0.1s;
+}
+
+
+.moon {
+ width: 50%;
+ height: 50%;
+ pointer-events: none;
+ position: absolute;
+ left: 12.5%;
+ top: 18.75%;
+ background-color: rgba(0, 0, 0, 0);
+ border-radius: 50%;
+ box-shadow: 9px 3px 0px 0px #f0f0f0;
+ opacity: 0;
+ transform: scale(0.3) rotate(65deg);
+ transition: transform 0.3s ease-in, opacity 0.2s ease-in 0.1s;
+}
+
+.moon.visible {
+ pointer-events: auto;
+ opacity: 1;
+ transform: scale(1) rotate(0deg);
+ transition: transform 0.3s ease-in, opacity 0.2s ease-in 0.1s;
+}
+
+.star {
+ position: absolute;
+ top: 25%;
+ left: 5%;
+ display: block;
+ width: 0px;
+ height: 0px;
+ border-right: 7px solid rgba(0, 0, 0, 0);
+ border-bottom: 5px solid #f0f0f0;
+ border-left: 7px solid rgba(0, 0, 0, 0);
+ transform: scale(0.55) rotate(35deg);
+ opacity: 0;
+ transition: all 0.2s ease-in 0.4s;
+}
+
+.star:before {
+ border-bottom: 5px solid #f0f0f0;
+ border-left: 3px solid rgba(0, 0, 0, 0);
+ border-right: 3px solid rgba(0, 0, 0, 0);
+ position: absolute;
+ height: 0;
+ width: 0;
+ top: -3px;
+ left: -5px;
+ display: block;
+ content: "";
+ transform: rotate(-35deg);
+}
+
+.star:after {
+ position: absolute;
+ display: block;
+ color: red;
+ top: 0px;
+ left: -7px;
+ width: 0px;
+ height: 0px;
+ border-right: 7px solid rgba(0, 0, 0, 0);
+ border-bottom: 5px solid #f0f0f0;
+ border-left: 7px solid rgba(0, 0, 0, 0);
+ transform: rotate(-70deg);
+ content: "";
+}
+
+.moon.visible .star {
+ opacity: 0.8;
+}
+
+.star.small {
+ transform: scale(0.35) rotate(35deg);
+ position: relative;
+ top: 50%;
+ left: 37.5%;
+ opacity: 0;
+ transition: all 0.2s ease-in 0.45s;
+}
+
+.moon.visible .star.small {
+ opacity: 0.7;
+ transform: scale(0.45) rotate(35deg);
+}
+
@media (max-width: 1100px) {
.navbar__menu {
display: none !important;
@@ -101,3 +235,4 @@
display: block !important;
}
}
+
diff --git a/webiu-ui/src/app/components/navbar/navbar.component.ts b/webiu-ui/src/app/components/navbar/navbar.component.ts
index 6b61d78a..6b590702 100644
--- a/webiu-ui/src/app/components/navbar/navbar.component.ts
+++ b/webiu-ui/src/app/components/navbar/navbar.component.ts
@@ -1,6 +1,7 @@
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
+import { ThemeService } from '../../services/theme.service';
@Component({
selector: 'app-navbar',
@@ -11,8 +12,18 @@ import { RouterModule } from '@angular/router';
})
export class NavbarComponent {
isMenuOpen = false;
-
+ isSunVisible = true;
toggleMenu() {
this.isMenuOpen = !this.isMenuOpen;
}
+ constructor(private themeService: ThemeService) {
+ this.isSunVisible = !this.themeService.isDarkMode();
+ }
+ toggleTheme(): void {
+ this.themeService.toggleDarkMode();
+ }
+ toggleMode() {
+ this.isSunVisible = !this.isSunVisible;
+ this.toggleTheme();
+ }
}
diff --git a/webiu-ui/src/app/components/profile-card/profile-card.component.scss b/webiu-ui/src/app/components/profile-card/profile-card.component.scss
index b9c6a4a9..2b011612 100644
--- a/webiu-ui/src/app/components/profile-card/profile-card.component.scss
+++ b/webiu-ui/src/app/components/profile-card/profile-card.component.scss
@@ -1,7 +1,8 @@
.profile-box {
display: flex;
- border: solid 1px #e0e0e0;
- box-shadow: 10px 10px 30px 10px #0505051a;
+ border: solid 1px var(--profile-box-border);
+ background-color: var(--profile-box-bg);
+ box-shadow: 10px 10px 30px 10px var(--profile-github-box-shadow);
border-radius: 10px;
width: 100%;
max-width: 350px;
@@ -33,7 +34,7 @@
align-items: center;
gap: 10px;
border-radius: 5px;
- background: var(--Gray-6, #eeecec);
+ background: var(--profile-github-bg);
padding: 8px 12px;
justify-content: center;
margin-top: 5%;
@@ -43,12 +44,17 @@
display: flex;
justify-content: center;
align-items: center;
+ svg {
+ path {
+ fill: var(--profile-github-username);
+ }
+ }
}
.github-username {
display: flex;
align-items: center;
- color: black;
+ color: var(--profile-github-username);
}
/* Media Queries */
diff --git a/webiu-ui/src/app/components/projects-card/projects-card.component.scss b/webiu-ui/src/app/components/projects-card/projects-card.component.scss
index 2c5e6562..5f8b010f 100644
--- a/webiu-ui/src/app/components/projects-card/projects-card.component.scss
+++ b/webiu-ui/src/app/components/projects-card/projects-card.component.scss
@@ -6,8 +6,8 @@
justify-content: space-between;
gap: 20px;
border-radius: 8px;
- border: 2px solid var(--primary-white, #fff);
- background: var(--primary-white, #fff);
+ border: 2px solid var(--border-color, #fff);
+ background: var(--card-container-2, #fff);
box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.1);
.projects__card__main {
@@ -72,9 +72,10 @@
color: var(--primary-dark, var(--primary-dark, #0a0a15));
border-radius: 4px;
border: 1px solid var(--Gray-5, #e0e0e0);
- background: var(--Gray-6, #f2f2f2);
+ background: var(--card-button-bg);
p {
+ color: var(--card-color-p);
width: 100px;
font-size: 14px;
font-weight: 500;
@@ -86,9 +87,12 @@
font-size: 14px;
font-weight: 400;
border-radius: 20px;
- background: var(--primary-white, #fff);
+ background: var(--card-span, #fff);
padding: 6px;
}
+ svg path {
+ fill: var(--card-color-p); /* Apply dynamic fill color */
+ }
}
.issue-btn {
@@ -101,22 +105,27 @@
color: var(--primary-dark, var(--primary-dark, #0a0a15));
border: 1px solid var(--Gray-5, #e0e0e0);
- background: var(--Gray-6, #f2f2f2);
+ background: var(--card-button-bg);
span {
color: var(--primary-dark, var(--primary-dark, #0a0a15));
font-size: 14px;
font-weight: 400;
border-radius: 20px;
- background: var(--primary-white, #fff);
+ background: var(--card-span, #fff);
padding: 6px;
}
p {
+ color: var(--card-color-p);
font-size: 14px;
font-weight: 500;
line-height: 150%;
}
+ svg path {
+ fill: var(--card-color-p); /* Apply dynamic fill color */
+ }
+
}
.git-btn {
diff --git a/webiu-ui/src/app/components/publications-card/publications-card.component.scss b/webiu-ui/src/app/components/publications-card/publications-card.component.scss
index e24b16db..80b51b1b 100644
--- a/webiu-ui/src/app/components/publications-card/publications-card.component.scss
+++ b/webiu-ui/src/app/components/publications-card/publications-card.component.scss
@@ -6,9 +6,9 @@
align-items: flex-start;
gap: 20px;
border-radius: 8px;
- border: 2px solid var(--primary-white, #fff);
- background: var(--primary-white, #fff);
- box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.1);
+ border: 2px solid var(--publications-card-border);
+ background: var(--publications-card-bg);
+ box-shadow: 0px 4px 24px 0px var(--publications-card-box-shadow);
width: 500px;
a {
diff --git a/webiu-ui/src/app/page/community/community.component.scss b/webiu-ui/src/app/page/community/community.component.scss
index b51763e2..f91ba937 100644
--- a/webiu-ui/src/app/page/community/community.component.scss
+++ b/webiu-ui/src/app/page/community/community.component.scss
@@ -74,8 +74,8 @@
align-items: flex-start;
gap: 5px;
border-radius: 10px;
- border: 1px solid var(--Gray-5, #e0e0e0);
- background: var(--primary-white, #fff);
+ border: 1px solid var(--community-card-border);
+ background: var(--community-card-bg);
box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.1);
.card-data {
diff --git a/webiu-ui/src/app/page/contributors/contributors.component.scss b/webiu-ui/src/app/page/contributors/contributors.component.scss
index 15a36230..075afab4 100644
--- a/webiu-ui/src/app/page/contributors/contributors.component.scss
+++ b/webiu-ui/src/app/page/contributors/contributors.component.scss
@@ -28,21 +28,21 @@
flex: 1;
padding: 14px 24px;
border-radius: 12px;
- border: 1px solid #e5e5e5;
- background: #f5f5f5;
+ border: 1px solid var(--search-border);
+ background: var(--search-bg);
font-size: 16px;
- color: #1a1a1a;
+ color: var(--search-color);
outline: none;
transition: all 0.2s ease;
&::placeholder {
- color: #1a1a1a;
+ color: var(--search-color);
opacity: 0.5;
}
&:focus {
border-color: #0066ff;
- background: #ffffff;
+ background: var(--search-bg);
}
}
@@ -77,23 +77,23 @@
gap: 12px;
span {
- color: var(--gray-900);
+ color: var(--filter-section-color);
font-size: 14px;
}
.repository-select {
- background-color: #e9f6ff;
+ background-color: var(--select-bg);
max-width: 300px;
}
select {
padding: 8px 16px;
- border: 1px solid var(--gray-200);
+ border: 1px solid var(--select-border);
border-radius: 6px;
font-size: 14px;
cursor: pointer;
outline: none;
-
+ color: var(--search-color);
&:focus {
border-color: var(--primary-blue);
}
@@ -121,9 +121,9 @@
font-size: 16px;
cursor: pointer;
transition: background-color 0.2s ease;
-
+
&:disabled {
- background-color: var(--gray-200);
+ opacity: 0; // Hide button when disabled
cursor: not-allowed;
}
@@ -134,7 +134,7 @@
span {
font-size: 16px;
- color: var(--gray-900);
+ color: var(--pagination-span);
}
}
diff --git a/webiu-ui/src/app/page/gsoc/gsoc.component.html b/webiu-ui/src/app/page/gsoc/gsoc.component.html
index 031c0c20..844a31c1 100644
--- a/webiu-ui/src/app/page/gsoc/gsoc.component.html
+++ b/webiu-ui/src/app/page/gsoc/gsoc.component.html
@@ -9,7 +9,7 @@ C2SI GSOC 2024
page.
-
+