mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
update npm & typescript
This commit is contained in:
25585
interface/package-lock.json
generated
25585
interface/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -6,29 +6,29 @@
|
|||||||
"@material-ui/core": "^4.11.3",
|
"@material-ui/core": "^4.11.3",
|
||||||
"@material-ui/icons": "^4.11.2",
|
"@material-ui/icons": "^4.11.2",
|
||||||
"@types/lodash": "^4.14.168",
|
"@types/lodash": "^4.14.168",
|
||||||
"@types/node": "^12.20.4",
|
"@types/node": "^14.14.37",
|
||||||
"@types/react": "^17.0.3",
|
"@types/react": "^17.0.3",
|
||||||
"@types/react-dom": "^17.0.1",
|
"@types/react-dom": "^17.0.3",
|
||||||
"@types/react-material-ui-form-validator": "^2.1.0",
|
"@types/react-material-ui-form-validator": "^2.1.0",
|
||||||
"@types/react-router": "^5.1.12",
|
"@types/react-router": "^5.1.13",
|
||||||
"@types/react-router-dom": "^5.1.6",
|
"@types/react-router-dom": "^5.1.7",
|
||||||
"compression-webpack-plugin": "^4.0.0",
|
"compression-webpack-plugin": "^7.1.2",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"jwt-decode": "^3.1.2",
|
"jwt-decode": "^3.1.2",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mime-types": "^2.1.29",
|
"mime-types": "^2.1.30",
|
||||||
"notistack": "^1.0.5",
|
"notistack": "^1.0.5",
|
||||||
"parse-ms": "^2.1.0",
|
"parse-ms": "^3.0.0",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.1",
|
"react-dom": "^17.0.2",
|
||||||
"react-dropzone": "^11.3.1",
|
"react-dropzone": "^11.3.2",
|
||||||
"react-form-validator-core": "^1.1.1",
|
"react-form-validator-core": "^1.1.1",
|
||||||
"react-material-ui-form-validator": "^2.1.4",
|
"react-material-ui-form-validator": "^2.1.4",
|
||||||
"react-router": "^5.2.0",
|
"react-router": "^5.2.0",
|
||||||
"react-router-dom": "^5.2.0",
|
"react-router-dom": "^5.2.0",
|
||||||
"react-scripts": "4.0.1",
|
"react-scripts": "4.0.3",
|
||||||
"sockette": "^2.0.6",
|
"sockette": "^2.0.6",
|
||||||
"typescript": "4.0.5",
|
"typescript": "4.2.4",
|
||||||
"zlib": "^1.0.5"
|
"zlib": "^1.0.5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -54,9 +54,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^6.0.0",
|
"concurrently": "^6.0.1",
|
||||||
"http-proxy-middleware": "^0.19.1",
|
"http-proxy-middleware": "^1.1.1",
|
||||||
"nodemon": "^2.0.4",
|
"nodemon": "^2.0.7",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"react-app-rewired": "^2.1.8"
|
"react-app-rewired": "^2.1.8"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,8 @@ import { withSnackbar, WithSnackbarProps } from 'notistack';
|
|||||||
import * as Authentication from './Authentication';
|
import * as Authentication from './Authentication';
|
||||||
import { withAuthenticationContext, AuthenticationContextProps, AuthenticatedContext, AuthenticatedContextValue } from './AuthenticationContext';
|
import { withAuthenticationContext, AuthenticationContextProps, AuthenticatedContext, AuthenticatedContextValue } from './AuthenticationContext';
|
||||||
|
|
||||||
type ChildComponent = React.ComponentType<RouteComponentProps<any>> | React.ComponentType<any>;
|
|
||||||
|
|
||||||
interface AuthenticatedRouteProps extends RouteProps, WithSnackbarProps, AuthenticationContextProps {
|
interface AuthenticatedRouteProps extends RouteProps, WithSnackbarProps, AuthenticationContextProps {
|
||||||
component: ChildComponent;
|
component: React.ComponentType<RouteComponentProps<any>> | React.ComponentType<any>;
|
||||||
}
|
}
|
||||||
|
|
||||||
type RenderComponent = (props: RouteComponentProps<any>) => React.ReactNode;
|
type RenderComponent = (props: RouteComponentProps<any>) => React.ReactNode;
|
||||||
@@ -27,7 +25,7 @@ export class AuthenticatedRoute extends React.Component<AuthenticatedRouteProps>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
Authentication.storeLoginRedirect(location);
|
Authentication.storeLoginRedirect(location);
|
||||||
enqueueSnackbar("Please sign in to continue.", { variant: 'info' });
|
enqueueSnackbar("Please sign in to continue", { variant: 'info' });
|
||||||
return (
|
return (
|
||||||
<Redirect to='/' />
|
<Redirect to='/' />
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class AuthenticationWrapper extends React.Component<AuthenticationWrapperProps,
|
|||||||
me: undefined
|
me: undefined
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.props.enqueueSnackbar("You have signed out.", { variant: 'success', });
|
this.props.enqueueSnackbar("You have signed out", { variant: 'success', });
|
||||||
history.push('/');
|
history.push('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ class UnauthenticatedRoute extends Route<UnauthenticatedRouteProps> {
|
|||||||
if (authenticationContext.me) {
|
if (authenticationContext.me) {
|
||||||
return (<Redirect to={Authentication.fetchLoginRedirect(features)} />);
|
return (<Redirect to={Authentication.fetchLoginRedirect(features)} />);
|
||||||
}
|
}
|
||||||
return (<Component {...props} />);
|
if (Component) {
|
||||||
|
return (<Component {...props} />);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Route {...rest} render={renderComponent} />
|
<Route {...rest} render={renderComponent} />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const createProxyMiddleware = require('http-proxy-middleware');
|
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||||
|
|
||||||
module.exports = function (app) {
|
module.exports = function (app) {
|
||||||
app.use(
|
app.use(
|
||||||
@@ -6,10 +6,7 @@ module.exports = function (app) {
|
|||||||
createProxyMiddleware({
|
createProxyMiddleware({
|
||||||
target: 'http://localhost:3080',
|
target: 'http://localhost:3080',
|
||||||
secure: false,
|
secure: false,
|
||||||
changeOrigin: true,
|
changeOrigin: true
|
||||||
// pathRewrite: {
|
|
||||||
// '^/api/settings': '/api/app/settings'
|
|
||||||
// },
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react",
|
"jsx": "react-jsx",
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
|
|||||||
1697
mock-api/package-lock.json
generated
1697
mock-api/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "api",
|
"name": "api",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
"private": "true",
|
||||||
"description": "mock api for EMS-ESP",
|
"description": "mock api for EMS-ESP",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -11,6 +12,6 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"nodemon": "^2.0.4"
|
"nodemon": "^2.0.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user