Added cookies
This commit is contained in:
@@ -31,15 +31,14 @@ const Login = props => {
|
|||||||
async evt => {
|
async evt => {
|
||||||
//on submit
|
//on submit
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
const [err, newTokens] = await handleSubmit(emailRef.current.value, passwordRef.current.value);
|
const [err, accessToken] = await handleSubmit(emailRef.current.value, passwordRef.current.value);
|
||||||
if (err) {
|
if (err) {
|
||||||
alert(err);
|
alert(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
//save auth tokens and redirect
|
//save auth tokens and redirect
|
||||||
if (newTokens) {
|
if (accessToken) {
|
||||||
authTokens.setAccessToken(newTokens.accessToken);
|
authTokens.setAccessToken(accessToken);
|
||||||
authTokens.setRefreshToken(newTokens.refreshToken);
|
|
||||||
|
|
||||||
props.history.push('/');
|
props.history.push('/');
|
||||||
}
|
}
|
||||||
@@ -77,7 +76,8 @@ const handleSubmit = async (email, password) => {
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
email,
|
email,
|
||||||
password,
|
password,
|
||||||
})
|
}),
|
||||||
|
credentials: 'include'
|
||||||
});
|
});
|
||||||
|
|
||||||
//handle errors
|
//handle errors
|
||||||
@@ -88,8 +88,8 @@ const handleSubmit = async (email, password) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//return the new auth tokens
|
//return the new auth tokens
|
||||||
const newTokens = await result.json();
|
const accessToken = await result.text();
|
||||||
return [null, newTokens];
|
return [null, accessToken];
|
||||||
};
|
};
|
||||||
|
|
||||||
//returns an error message, or null on success
|
//returns an error message, or null on success
|
||||||
|
|||||||
@@ -51,13 +51,7 @@ const handleSubmit = async (password, authTokens) => {
|
|||||||
|
|
||||||
//force a logout
|
//force a logout
|
||||||
const result2 = await authTokens.tokenFetch(`${process.env.AUTH_URI}/auth/logout`, {
|
const result2 = await authTokens.tokenFetch(`${process.env.AUTH_URI}/auth/logout`, {
|
||||||
method: 'DELETE',
|
method: 'DELETE'
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify({
|
|
||||||
token: authTokens.refreshToken
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result2.ok) {
|
if (!result2.ok) {
|
||||||
@@ -65,7 +59,6 @@ const handleSubmit = async (password, authTokens) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
authTokens.setAccessToken('');
|
authTokens.setAccessToken('');
|
||||||
authTokens.setRefreshToken('');
|
|
||||||
|
|
||||||
return [null];
|
return [null];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,13 +12,7 @@ const Logout = () => {
|
|||||||
{ /* Logout logs you out of the server too */ }
|
{ /* Logout logs you out of the server too */ }
|
||||||
<Link to='/' onClick={async () => {
|
<Link to='/' onClick={async () => {
|
||||||
const result = await authTokens.tokenFetch(`${process.env.AUTH_URI}/auth/logout`, { //NOTE: this gets overwritten as a bugfix
|
const result = await authTokens.tokenFetch(`${process.env.AUTH_URI}/auth/logout`, { //NOTE: this gets overwritten as a bugfix
|
||||||
method: 'DELETE',
|
method: 'DELETE'
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify({
|
|
||||||
token: authTokens.refreshToken
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//any problems?
|
//any problems?
|
||||||
@@ -26,7 +20,6 @@ const Logout = () => {
|
|||||||
console.error(await result.text());
|
console.error(await result.text());
|
||||||
} else {
|
} else {
|
||||||
authTokens.setAccessToken('');
|
authTokens.setAccessToken('');
|
||||||
authTokens.setRefreshToken('');
|
|
||||||
}
|
}
|
||||||
}}>Logout</Link>
|
}}>Logout</Link>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
const Static = props => {
|
const Static = props => {
|
||||||
return (
|
return (
|
||||||
@@ -8,6 +9,8 @@ const Static = props => {
|
|||||||
</header>
|
</header>
|
||||||
<h2 className='text centered'>MERN-template</h2>
|
<h2 className='text centered'>MERN-template</h2>
|
||||||
<p>The <a href='https://github.com/krgamestudios/MERN-template'>MERN-template</a> developed by Kayne Ruse, KR Game Studios</p>
|
<p>The <a href='https://github.com/krgamestudios/MERN-template'>MERN-template</a> developed by Kayne Ruse, KR Game Studios</p>
|
||||||
|
|
||||||
|
<Link className='text centered' to='/'>Return Home</Link>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
const Static = props => {
|
const Static = props => {
|
||||||
return (
|
return (
|
||||||
<div className='page central'>
|
<div className='page central'>
|
||||||
<header>
|
<header>
|
||||||
<h1 className="text centered">Privacy Policy</h1>
|
<h1 className="text centered">Privacy Policy</h1>
|
||||||
|
|
||||||
|
<Link className='text centered' to='/'>Return Home</Link>
|
||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,19 +8,16 @@ export const TokenContext = createContext();
|
|||||||
const TokenProvider = props => {
|
const TokenProvider = props => {
|
||||||
//state to be used
|
//state to be used
|
||||||
const [accessToken, setAccessToken] = useState('');
|
const [accessToken, setAccessToken] = useState('');
|
||||||
const [refreshToken, setRefreshToken] = useState('');
|
|
||||||
|
|
||||||
//make the access and refresh tokens persist between reloads
|
//make the access token persist between reloads
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setAccessToken(localStorage.getItem("accessToken") || '');
|
setAccessToken(localStorage.getItem("accessToken") || '');
|
||||||
setRefreshToken(localStorage.getItem("refreshToken") || '');
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
//update the stored copies
|
//update the stored copies
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
localStorage.setItem("accessToken", accessToken);
|
localStorage.setItem("accessToken", accessToken);
|
||||||
localStorage.setItem("refreshToken", refreshToken);
|
}, [accessToken]);
|
||||||
}, [accessToken, refreshToken]);
|
|
||||||
|
|
||||||
//wrap the default fetch function
|
//wrap the default fetch function
|
||||||
const tokenFetch = async (url, options) => {
|
const tokenFetch = async (url, options) => {
|
||||||
@@ -36,24 +33,16 @@ const TokenProvider = props => {
|
|||||||
return fetch(url, {
|
return fetch(url, {
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
|
||||||
'Authorization': `Bearer ${bearer}`
|
'Authorization': `Bearer ${bearer}`
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
credentials: 'include'
|
||||||
token: refreshToken
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//ping the auth server for a new token
|
//ping the auth server for a new access token
|
||||||
const response = await fetch(`${process.env.AUTH_URI}/auth/token`, {
|
const response = await fetch(`${process.env.AUTH_URI}/auth/token`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
credentials: 'include'
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify({
|
|
||||||
token: refreshToken
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//any errors, throw them
|
//any errors, throw them
|
||||||
@@ -65,7 +54,6 @@ const TokenProvider = props => {
|
|||||||
const newAuth = await response.json();
|
const newAuth = await response.json();
|
||||||
|
|
||||||
setAccessToken(newAuth.accessToken);
|
setAccessToken(newAuth.accessToken);
|
||||||
setRefreshToken(newAuth.refreshToken);
|
|
||||||
bearer = newAuth.accessToken;
|
bearer = newAuth.accessToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +63,8 @@ const TokenProvider = props => {
|
|||||||
headers: {
|
headers: {
|
||||||
...(options || { headers: {} }).headers,
|
...(options || { headers: {} }).headers,
|
||||||
'Authorization': `Bearer ${bearer}`
|
'Authorization': `Bearer ${bearer}`
|
||||||
}
|
},
|
||||||
|
credentials: 'include'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -88,12 +77,7 @@ const TokenProvider = props => {
|
|||||||
//ping the auth server for a new token
|
//ping the auth server for a new token
|
||||||
const response = await fetch(`${process.env.AUTH_URI}/auth/token`, {
|
const response = await fetch(`${process.env.AUTH_URI}/auth/token`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
credentials: 'include'
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify({
|
|
||||||
token: refreshToken
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//any errors, throw them
|
//any errors, throw them
|
||||||
@@ -105,7 +89,6 @@ const TokenProvider = props => {
|
|||||||
const newAuth = await response.json();
|
const newAuth = await response.json();
|
||||||
|
|
||||||
setAccessToken(newAuth.accessToken);
|
setAccessToken(newAuth.accessToken);
|
||||||
setRefreshToken(newAuth.refreshToken);
|
|
||||||
|
|
||||||
//finally
|
//finally
|
||||||
return cb(newAuth.accessToken);
|
return cb(newAuth.accessToken);
|
||||||
@@ -115,7 +98,7 @@ const TokenProvider = props => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TokenContext.Provider value={{ accessToken, refreshToken, setAccessToken, setRefreshToken, tokenFetch, tokenCallback, getPayload: () => decode(accessToken) }}>
|
<TokenContext.Provider value={{ accessToken, setAccessToken, tokenFetch, tokenCallback, getPayload: () => decode(accessToken) }}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</TokenContext.Provider>
|
</TokenContext.Provider>
|
||||||
)
|
)
|
||||||
|
|||||||
Generated
+66
-70
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "mern-template",
|
"name": "mern-template",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mern-template",
|
"name": "mern-template",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.14.8",
|
"@babel/core": "^7.14.8",
|
||||||
@@ -204,14 +204,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-define-polyfill-provider": {
|
"node_modules/@babel/helper-define-polyfill-provider": {
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.2.tgz",
|
||||||
"integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==",
|
"integrity": "sha512-r9QJJ+uDWrd+94BSPcP6/de67ygLtvVy6cK4luE6MOuDsZIdoaPBnfSpbO/+LTifjPckbKXRuI9BB/Z2/y3iTg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-compilation-targets": "^7.13.0",
|
"@babel/helper-compilation-targets": "^7.17.7",
|
||||||
"@babel/helper-module-imports": "^7.12.13",
|
"@babel/helper-plugin-utils": "^7.16.7",
|
||||||
"@babel/helper-plugin-utils": "^7.13.0",
|
|
||||||
"@babel/traverse": "^7.13.0",
|
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
"resolve": "^1.14.2",
|
"resolve": "^1.14.2",
|
||||||
@@ -1995,9 +1993,9 @@
|
|||||||
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA=="
|
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA=="
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "18.0.6",
|
"version": "18.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.1.tgz",
|
||||||
"integrity": "sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw=="
|
"integrity": "sha512-z+2vB6yDt1fNwKOeGbckpmirO+VBDuQqecXkgeIqDlaOtmKn6hPR/viQ8cxCfqLU4fTlvM3+YjM367TukWdxpg=="
|
||||||
},
|
},
|
||||||
"node_modules/@types/parse-json": {
|
"node_modules/@types/parse-json": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
@@ -2526,12 +2524,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/babel-plugin-polyfill-corejs2": {
|
"node_modules/babel-plugin-polyfill-corejs2": {
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.2.tgz",
|
||||||
"integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==",
|
"integrity": "sha512-LPnodUl3lS0/4wN3Rb+m+UK8s7lj2jcLRrjho4gLw+OJs+I4bvGXshINesY5xx/apM+biTnQ9reDI8yj+0M5+Q==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/compat-data": "^7.13.11",
|
"@babel/compat-data": "^7.17.7",
|
||||||
"@babel/helper-define-polyfill-provider": "^0.3.1",
|
"@babel/helper-define-polyfill-provider": "^0.3.2",
|
||||||
"semver": "^6.1.1"
|
"semver": "^6.1.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
@@ -2539,11 +2537,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/babel-plugin-polyfill-corejs3": {
|
"node_modules/babel-plugin-polyfill-corejs3": {
|
||||||
"version": "0.5.2",
|
"version": "0.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.3.tgz",
|
||||||
"integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==",
|
"integrity": "sha512-zKsXDh0XjnrUEW0mxIHLfjBfnXSMr5Q/goMe/fxpQnLm07mcOZiIZHBNWCMx60HmdvjxfXcalac0tfFg0wqxyw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-define-polyfill-provider": "^0.3.1",
|
"@babel/helper-define-polyfill-provider": "^0.3.2",
|
||||||
"core-js-compat": "^3.21.0"
|
"core-js-compat": "^3.21.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
@@ -2739,9 +2737,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001369",
|
"version": "1.0.30001370",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001369.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001370.tgz",
|
||||||
"integrity": "sha512-OY1SBHaodJc4wflDIKnlkdqWzJZd1Ls/2zbVJHBSv3AT7vgOJ58yAhd2CN4d57l2kPJrgMb7P9+N1Mhy4tNSQA==",
|
"integrity": "sha512-3PDmaP56wz/qz7G508xzjx8C+MC2qEm4SYhSEzC9IBROo+dGXFWRuaXkWti0A9tuI00g+toiriVqxtWMgl350g==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -3144,9 +3142,9 @@
|
|||||||
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
|
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
|
||||||
},
|
},
|
||||||
"node_modules/core-js-compat": {
|
"node_modules/core-js-compat": {
|
||||||
"version": "3.23.5",
|
"version": "3.24.0",
|
||||||
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.5.tgz",
|
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.24.0.tgz",
|
||||||
"integrity": "sha512-fHYozIFIxd+91IIbXJgWd/igXIc8Mf9is0fusswjnGIWVG96y2cwyUdlCkGOw6rMLHKAxg7xtCIVaHsyOUnJIg==",
|
"integrity": "sha512-F+2E63X3ff/nj8uIrf8Rf24UDGIz7p838+xjEp+Bx3y8OWXj+VTPPZNCtdqovPaS9o7Tka5mCH01Zn5vOd6UQg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"browserslist": "^4.21.2",
|
"browserslist": "^4.21.2",
|
||||||
"semver": "7.0.0"
|
"semver": "7.0.0"
|
||||||
@@ -3526,9 +3524,9 @@
|
|||||||
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.4.199",
|
"version": "1.4.200",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.199.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.200.tgz",
|
||||||
"integrity": "sha512-WIGME0Cs7oob3mxsJwHbeWkH0tYkIE/sjkJ8ML2BYmuRcjhRl/q5kVDXG7W9LOOKwzPU5M0LBlXRq9rlSgnNlg=="
|
"integrity": "sha512-nPyI7oHc8T64oSqRXrAt99gNMpk0SAgPHw/o+hkNKyb5+bcdnFtZcSO9FUJES5cVkVZvo8u4qiZ1gQILl8UXsA=="
|
||||||
},
|
},
|
||||||
"node_modules/emoji-regex": {
|
"node_modules/emoji-regex": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
@@ -6981,20 +6979,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/webpack": {
|
"node_modules/webpack": {
|
||||||
"version": "5.73.0",
|
"version": "5.74.0",
|
||||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz",
|
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz",
|
||||||
"integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==",
|
"integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/eslint-scope": "^3.7.3",
|
"@types/eslint-scope": "^3.7.3",
|
||||||
"@types/estree": "^0.0.51",
|
"@types/estree": "^0.0.51",
|
||||||
"@webassemblyjs/ast": "1.11.1",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/wasm-edit": "1.11.1",
|
"@webassemblyjs/wasm-edit": "1.11.1",
|
||||||
"@webassemblyjs/wasm-parser": "1.11.1",
|
"@webassemblyjs/wasm-parser": "1.11.1",
|
||||||
"acorn": "^8.4.1",
|
"acorn": "^8.7.1",
|
||||||
"acorn-import-assertions": "^1.7.6",
|
"acorn-import-assertions": "^1.7.6",
|
||||||
"browserslist": "^4.14.5",
|
"browserslist": "^4.14.5",
|
||||||
"chrome-trace-event": "^1.0.2",
|
"chrome-trace-event": "^1.0.2",
|
||||||
"enhanced-resolve": "^5.9.3",
|
"enhanced-resolve": "^5.10.0",
|
||||||
"es-module-lexer": "^0.9.0",
|
"es-module-lexer": "^0.9.0",
|
||||||
"eslint-scope": "5.1.1",
|
"eslint-scope": "5.1.1",
|
||||||
"events": "^3.2.0",
|
"events": "^3.2.0",
|
||||||
@@ -7007,7 +7005,7 @@
|
|||||||
"schema-utils": "^3.1.0",
|
"schema-utils": "^3.1.0",
|
||||||
"tapable": "^2.1.1",
|
"tapable": "^2.1.1",
|
||||||
"terser-webpack-plugin": "^5.1.3",
|
"terser-webpack-plugin": "^5.1.3",
|
||||||
"watchpack": "^2.3.1",
|
"watchpack": "^2.4.0",
|
||||||
"webpack-sources": "^3.2.3"
|
"webpack-sources": "^3.2.3"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -7755,14 +7753,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/helper-define-polyfill-provider": {
|
"@babel/helper-define-polyfill-provider": {
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.2.tgz",
|
||||||
"integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==",
|
"integrity": "sha512-r9QJJ+uDWrd+94BSPcP6/de67ygLtvVy6cK4luE6MOuDsZIdoaPBnfSpbO/+LTifjPckbKXRuI9BB/Z2/y3iTg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/helper-compilation-targets": "^7.13.0",
|
"@babel/helper-compilation-targets": "^7.17.7",
|
||||||
"@babel/helper-module-imports": "^7.12.13",
|
"@babel/helper-plugin-utils": "^7.16.7",
|
||||||
"@babel/helper-plugin-utils": "^7.13.0",
|
|
||||||
"@babel/traverse": "^7.13.0",
|
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
"resolve": "^1.14.2",
|
"resolve": "^1.14.2",
|
||||||
@@ -9024,9 +9020,9 @@
|
|||||||
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA=="
|
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA=="
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "18.0.6",
|
"version": "18.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.1.tgz",
|
||||||
"integrity": "sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw=="
|
"integrity": "sha512-z+2vB6yDt1fNwKOeGbckpmirO+VBDuQqecXkgeIqDlaOtmKn6hPR/viQ8cxCfqLU4fTlvM3+YjM367TukWdxpg=="
|
||||||
},
|
},
|
||||||
"@types/parse-json": {
|
"@types/parse-json": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
@@ -9483,21 +9479,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"babel-plugin-polyfill-corejs2": {
|
"babel-plugin-polyfill-corejs2": {
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.2.tgz",
|
||||||
"integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==",
|
"integrity": "sha512-LPnodUl3lS0/4wN3Rb+m+UK8s7lj2jcLRrjho4gLw+OJs+I4bvGXshINesY5xx/apM+biTnQ9reDI8yj+0M5+Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/compat-data": "^7.13.11",
|
"@babel/compat-data": "^7.17.7",
|
||||||
"@babel/helper-define-polyfill-provider": "^0.3.1",
|
"@babel/helper-define-polyfill-provider": "^0.3.2",
|
||||||
"semver": "^6.1.1"
|
"semver": "^6.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"babel-plugin-polyfill-corejs3": {
|
"babel-plugin-polyfill-corejs3": {
|
||||||
"version": "0.5.2",
|
"version": "0.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.3.tgz",
|
||||||
"integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==",
|
"integrity": "sha512-zKsXDh0XjnrUEW0mxIHLfjBfnXSMr5Q/goMe/fxpQnLm07mcOZiIZHBNWCMx60HmdvjxfXcalac0tfFg0wqxyw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/helper-define-polyfill-provider": "^0.3.1",
|
"@babel/helper-define-polyfill-provider": "^0.3.2",
|
||||||
"core-js-compat": "^3.21.0"
|
"core-js-compat": "^3.21.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -9653,9 +9649,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"caniuse-lite": {
|
"caniuse-lite": {
|
||||||
"version": "1.0.30001369",
|
"version": "1.0.30001370",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001369.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001370.tgz",
|
||||||
"integrity": "sha512-OY1SBHaodJc4wflDIKnlkdqWzJZd1Ls/2zbVJHBSv3AT7vgOJ58yAhd2CN4d57l2kPJrgMb7P9+N1Mhy4tNSQA=="
|
"integrity": "sha512-3PDmaP56wz/qz7G508xzjx8C+MC2qEm4SYhSEzC9IBROo+dGXFWRuaXkWti0A9tuI00g+toiriVqxtWMgl350g=="
|
||||||
},
|
},
|
||||||
"chalk": {
|
"chalk": {
|
||||||
"version": "2.4.2",
|
"version": "2.4.2",
|
||||||
@@ -9941,9 +9937,9 @@
|
|||||||
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
|
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
|
||||||
},
|
},
|
||||||
"core-js-compat": {
|
"core-js-compat": {
|
||||||
"version": "3.23.5",
|
"version": "3.24.0",
|
||||||
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.5.tgz",
|
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.24.0.tgz",
|
||||||
"integrity": "sha512-fHYozIFIxd+91IIbXJgWd/igXIc8Mf9is0fusswjnGIWVG96y2cwyUdlCkGOw6rMLHKAxg7xtCIVaHsyOUnJIg==",
|
"integrity": "sha512-F+2E63X3ff/nj8uIrf8Rf24UDGIz7p838+xjEp+Bx3y8OWXj+VTPPZNCtdqovPaS9o7Tka5mCH01Zn5vOd6UQg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"browserslist": "^4.21.2",
|
"browserslist": "^4.21.2",
|
||||||
"semver": "7.0.0"
|
"semver": "7.0.0"
|
||||||
@@ -10213,9 +10209,9 @@
|
|||||||
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
||||||
},
|
},
|
||||||
"electron-to-chromium": {
|
"electron-to-chromium": {
|
||||||
"version": "1.4.199",
|
"version": "1.4.200",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.199.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.200.tgz",
|
||||||
"integrity": "sha512-WIGME0Cs7oob3mxsJwHbeWkH0tYkIE/sjkJ8ML2BYmuRcjhRl/q5kVDXG7W9LOOKwzPU5M0LBlXRq9rlSgnNlg=="
|
"integrity": "sha512-nPyI7oHc8T64oSqRXrAt99gNMpk0SAgPHw/o+hkNKyb5+bcdnFtZcSO9FUJES5cVkVZvo8u4qiZ1gQILl8UXsA=="
|
||||||
},
|
},
|
||||||
"emoji-regex": {
|
"emoji-regex": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
@@ -12758,20 +12754,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"webpack": {
|
"webpack": {
|
||||||
"version": "5.73.0",
|
"version": "5.74.0",
|
||||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz",
|
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz",
|
||||||
"integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==",
|
"integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/eslint-scope": "^3.7.3",
|
"@types/eslint-scope": "^3.7.3",
|
||||||
"@types/estree": "^0.0.51",
|
"@types/estree": "^0.0.51",
|
||||||
"@webassemblyjs/ast": "1.11.1",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/wasm-edit": "1.11.1",
|
"@webassemblyjs/wasm-edit": "1.11.1",
|
||||||
"@webassemblyjs/wasm-parser": "1.11.1",
|
"@webassemblyjs/wasm-parser": "1.11.1",
|
||||||
"acorn": "^8.4.1",
|
"acorn": "^8.7.1",
|
||||||
"acorn-import-assertions": "^1.7.6",
|
"acorn-import-assertions": "^1.7.6",
|
||||||
"browserslist": "^4.14.5",
|
"browserslist": "^4.14.5",
|
||||||
"chrome-trace-event": "^1.0.2",
|
"chrome-trace-event": "^1.0.2",
|
||||||
"enhanced-resolve": "^5.9.3",
|
"enhanced-resolve": "^5.10.0",
|
||||||
"es-module-lexer": "^0.9.0",
|
"es-module-lexer": "^0.9.0",
|
||||||
"eslint-scope": "5.1.1",
|
"eslint-scope": "5.1.1",
|
||||||
"events": "^3.2.0",
|
"events": "^3.2.0",
|
||||||
@@ -12784,7 +12780,7 @@
|
|||||||
"schema-utils": "^3.1.0",
|
"schema-utils": "^3.1.0",
|
||||||
"tapable": "^2.1.1",
|
"tapable": "^2.1.1",
|
||||||
"terser-webpack-plugin": "^5.1.3",
|
"terser-webpack-plugin": "^5.1.3",
|
||||||
"watchpack": "^2.3.1",
|
"watchpack": "^2.4.0",
|
||||||
"webpack-sources": "^3.2.3"
|
"webpack-sources": "^3.2.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mern-template",
|
"name": "mern-template",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"description": "A website template using the MERN stack.",
|
"description": "A website template using the MERN stack.",
|
||||||
"main": "server/server.js",
|
"main": "server/server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user