박민정

[update] Fix countless error.. and admin page is deleted

Showing 103 changed files with 2906 additions and 875 deletions
This diff could not be displayed because it is too large.
...@@ -4,21 +4,25 @@ ...@@ -4,21 +4,25 @@
4 "private": true, 4 "private": true,
5 "dependencies": { 5 "dependencies": {
6 "antd": "^3.24.1", 6 "antd": "^3.24.1",
7 - "axios": "^0.19.2", 7 + "axios": "^0.18.0",
8 - "core-js": "^3.6.4", 8 + "bootstrap": "^4.6.0",
9 "formik": "^1.5.8", 9 "formik": "^1.5.8",
10 "moment": "^2.24.0", 10 "moment": "^2.24.0",
11 "react": "^16.8.6", 11 "react": "^16.8.6",
12 - "react-app-polyfill": "^1.0.6", 12 + "react-bootstrap": "^1.6.1",
13 "react-dom": "^16.8.6", 13 "react-dom": "^16.8.6",
14 - "react-dropzone": "^11.3.2", 14 + "react-dropzone": "^10.2.1",
15 "react-icons": "^3.7.0", 15 "react-icons": "^3.7.0",
16 + "react-image-gallery": "^1.0.3",
17 + "react-paypal-express-checkout": "^1.0.5",
16 "react-redux": "^7.1.0-rc.1", 18 "react-redux": "^7.1.0-rc.1",
17 "react-router-dom": "^5.0.1", 19 "react-router-dom": "^5.0.1",
18 - "react-scripts": "3.4.1", 20 + "react-scripts": "3.0.1",
19 "redux": "^4.0.0", 21 "redux": "^4.0.0",
22 + "redux-form": "^8.2.6",
20 "redux-promise": "^0.6.0", 23 "redux-promise": "^0.6.0",
21 "redux-thunk": "^2.3.0", 24 "redux-thunk": "^2.3.0",
25 + "socket.io-client": "^2.2.0",
22 "yup": "^0.27.0" 26 "yup": "^0.27.0"
23 }, 27 },
24 "scripts": { 28 "scripts": {
......
...@@ -19,7 +19,13 @@ ...@@ -19,7 +19,13 @@
19 work correctly both with client-side routing and a non-root public URL. 19 work correctly both with client-side routing and a non-root public URL.
20 Learn how to configure a non-root public URL by running `npm run build`. 20 Learn how to configure a non-root public URL by running `npm run build`.
21 --> 21 -->
22 - <title>React App</title> 22 + <link
23 + rel="stylesheet"
24 + href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
25 + integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
26 + crossorigin="anonymous"
27 + />
28 + <title>약 배달 서비스 : 약사</title>
23 </head> 29 </head>
24 <body> 30 <body>
25 <noscript>You need to enable JavaScript to run this app.</noscript> 31 <noscript>You need to enable JavaScript to run this app.</noscript>
......
1 -// type들만 관리하는 곳
2 -
3 export const LOGIN_USER = 'login_user'; 1 export const LOGIN_USER = 'login_user';
4 export const REGISTER_USER = 'register_user'; 2 export const REGISTER_USER = 'register_user';
5 export const AUTH_USER = 'auth_user'; 3 export const AUTH_USER = 'auth_user';
6 export const LOGOUT_USER = 'logout_user'; 4 export const LOGOUT_USER = 'logout_user';
5 +export const ADD_TO_CART_USER = 'add_to_cart_user';
6 +export const GET_CART_ITEMS_USER = 'get_cart_items_user';
7 +export const REMOVE_CART_ITEM_USER = 'remove_cart_item_user';
8 +export const ON_SUCCESS_BUY_USER = 'on_success_buy_user';
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -4,38 +4,36 @@ import { ...@@ -4,38 +4,36 @@ import {
4 REGISTER_USER, 4 REGISTER_USER,
5 AUTH_USER, 5 AUTH_USER,
6 LOGOUT_USER, 6 LOGOUT_USER,
7 + ADD_TO_CART_USER,
8 + GET_CART_ITEMS_USER,
9 + REMOVE_CART_ITEM_USER,
10 + ON_SUCCESS_BUY_USER
7 } from './types'; 11 } from './types';
8 import { USER_SERVER } from '../components/Config.js'; 12 import { USER_SERVER } from '../components/Config.js';
9 13
10 -export function loginUser(logInfo){ 14 +export function registerUser(dataToSubmit) {
11 - const request = axios.post(`${USER_SERVER}/login`,logInfo)// logInfo를 post로 전달 15 + const request = axios.post(`${USER_SERVER}/register`, dataToSubmit)
12 - .then(response => response.data); // 서버에서 받은 데이터를 request에 저장
13 -
14 -return { // return을 통해 Reducer로 보냄
15 - // Reducer에서 previousState, action을 이용해 nextState로 만들기 때문 :: (previousState, action) => nextState
16 - // request를 reducer로 보내는 작업
17 -
18 - // action은 type과 response을 넣어줘야 함
19 - type: LOGIN_USER,
20 - payload: request // payroad == response
21 -}
22 -}
23 -
24 -export function registerUser(dataToSubmit){
25 - const request = axios.post(`${USER_SERVER}/register`,dataToSubmit)
26 .then(response => response.data); 16 .then(response => response.data);
27 - 17 +
28 return { 18 return {
29 type: REGISTER_USER, 19 type: REGISTER_USER,
30 payload: request 20 payload: request
31 } 21 }
32 } 22 }
33 23
24 +export function loginUser(dataToSubmit) {
25 + const request = axios.post(`${USER_SERVER}/login`, dataToSubmit)
26 + .then(response => response.data);
34 27
28 + return {
29 + type: LOGIN_USER,
30 + payload: request
31 + }
32 +}
35 33
36 -export function auth(){ 34 +export function auth() {
37 const request = axios.get(`${USER_SERVER}/auth`) 35 const request = axios.get(`${USER_SERVER}/auth`)
38 - .then(response => response.data); 36 + .then(response => response.data);
39 37
40 return { 38 return {
41 type: AUTH_USER, 39 type: AUTH_USER,
...@@ -43,9 +41,9 @@ export function auth(){ ...@@ -43,9 +41,9 @@ export function auth(){
43 } 41 }
44 } 42 }
45 43
46 -export function logoutUser(){ 44 +export function logoutUser() {
47 const request = axios.get(`${USER_SERVER}/logout`) 45 const request = axios.get(`${USER_SERVER}/logout`)
48 - .then(response => response.data); 46 + .then(response => response.data);
49 47
50 return { 48 return {
51 type: LOGOUT_USER, 49 type: LOGOUT_USER,
...@@ -53,3 +51,80 @@ export function logoutUser(){ ...@@ -53,3 +51,80 @@ export function logoutUser(){
53 } 51 }
54 } 52 }
55 53
54 +
55 +export function addToCart(_id) {
56 + const request = axios.get(`${USER_SERVER}/addToCart?productId=${_id}`)
57 + .then(response => response.data);
58 +
59 + return {
60 + type: ADD_TO_CART_USER,
61 + payload: request
62 + }
63 +}
64 +
65 +
66 +
67 +export function getCartItems(cartItems, userCart) {
68 + const request = axios.get(`/api/product/products_by_id?id=${cartItems}&type=array`)
69 + .then(response => {
70 +
71 +
72 + //Make CartDetail inside Redux Store
73 + // We need to add quantity data to Product Information that come from Product Collection.
74 +
75 + userCart.forEach(cartItem => {
76 + response.data.forEach((productDetail, i) => {
77 + if (cartItem.id === productDetail._id) {
78 + response.data[i].quantity = cartItem.quantity;
79 + }
80 + })
81 + })
82 +
83 + return response.data;
84 + });
85 +
86 + return {
87 + type: GET_CART_ITEMS_USER,
88 + payload: request
89 + }
90 +}
91 +
92 +
93 +
94 +
95 +export function removeCartItem(id) {
96 + const request = axios.get(`/api/users/removeFromCart?_id=${id}`)
97 + .then(response => {
98 +
99 + response.data.cart.forEach(item => {
100 + response.data.cartDetail.forEach((k, i) => {
101 + if (item.id === k._id) {
102 + response.data.cartDetail[i].quantity = item.quantity
103 + }
104 + })
105 + })
106 + return response.data;
107 + });
108 +
109 + return {
110 + type: REMOVE_CART_ITEM_USER,
111 + payload: request
112 + }
113 +}
114 +
115 +
116 +export function onSuccessBuy(data) {
117 +
118 + const request = axios.post(`${USER_SERVER}/successBuy`, data)
119 + .then(response => response.data);
120 +
121 + return {
122 + type: ON_SUCCESS_BUY_USER,
123 + payload: request
124 + }
125 +}
126 +
127 +
128 +
129 +
130 +
......
1 -import { combineReducers } from 'redux'; 1 +import { combineReducers } from "redux";
2 -import user from './user_reducer'; 2 +import user from "./user_reducer";
3 3
4 const rootReducer = combineReducers({ 4 const rootReducer = combineReducers({
5 - user, 5 + user,
6 }); 6 });
7 7
8 -export default rootReducer;
...\ No newline at end of file ...\ No newline at end of file
8 +export default rootReducer;
......
...@@ -3,19 +3,54 @@ import { ...@@ -3,19 +3,54 @@ import {
3 REGISTER_USER, 3 REGISTER_USER,
4 AUTH_USER, 4 AUTH_USER,
5 LOGOUT_USER, 5 LOGOUT_USER,
6 + ADD_TO_CART_USER,
7 + GET_CART_ITEMS_USER,
8 + REMOVE_CART_ITEM_USER,
9 + ON_SUCCESS_BUY_USER
6 } from '../_actions/types'; 10 } from '../_actions/types';
7 -
8 11
9 -export default function(state={},action){ 12 +
10 - switch(action.type){ 13 +export default function (state = {}, action) {
14 + switch (action.type) {
11 case REGISTER_USER: 15 case REGISTER_USER:
12 - return {...state, register: action.payload } 16 + return { ...state, register: action.payload }
13 case LOGIN_USER: 17 case LOGIN_USER:
14 return { ...state, loginSucces: action.payload } 18 return { ...state, loginSucces: action.payload }
15 case AUTH_USER: 19 case AUTH_USER:
16 - return {...state, userData: action.payload } 20 + return { ...state, userData: action.payload }
17 case LOGOUT_USER: 21 case LOGOUT_USER:
18 - return {...state } 22 + return { ...state }
23 + case ADD_TO_CART_USER:
24 + return {
25 + ...state, userData: {
26 + ...state.userData,
27 + cart: action.payload
28 + }
29 + }
30 + case GET_CART_ITEMS_USER:
31 + return {
32 + ...state, cartDetail: action.payload
33 + }
34 + case REMOVE_CART_ITEM_USER:
35 + return {
36 + ...state,
37 + cartDetail: action.payload.cartDetail,
38 + userData: {
39 + ...state.userData,
40 + cart: action.payload.cart
41 + }
42 +
43 + }
44 + case ON_SUCCESS_BUY_USER:
45 + return {
46 + ...state,
47 + userData: {
48 + ...state.userData,
49 + cart: action.payload.cart
50 + },
51 + cartDetail: action.payload.cartDetail
52 + }
53 +
19 default: 54 default:
20 return state; 55 return state;
21 } 56 }
......
1 -import React, { Suspense } from 'react'; 1 +import React, { Suspense } from "react";
2 import { Route, Switch } from "react-router-dom"; 2 import { Route, Switch } from "react-router-dom";
3 import Auth from "../hoc/auth"; 3 import Auth from "../hoc/auth";
4 // pages for this product 4 // pages for this product
5 import LandingPage from "./views/LandingPage/LandingPage.js"; 5 import LandingPage from "./views/LandingPage/LandingPage.js";
6 import LoginPage from "./views/LoginPage/LoginPage.js"; 6 import LoginPage from "./views/LoginPage/LoginPage.js";
7 import RegisterPage from "./views/RegisterPage/RegisterPage.js"; 7 import RegisterPage from "./views/RegisterPage/RegisterPage.js";
8 -import UploadPage from './views/UploadPage/UploadPage';
9 import NavBar from "./views/NavBar/NavBar"; 8 import NavBar from "./views/NavBar/NavBar";
10 -import Footer from "./views/Footer/Footer" 9 +import Footer from "./views/Footer/Footer";
11 - 10 +import UploadProductPage from "./views/UploadProductPage/UploadProductPage";
12 -//null Anyone Can go inside 11 +import DetailProductPage from "./views/DetailProductPage/DetailProductPage";
13 -//true only logged in user can go inside 12 +import CartPage from "./views/CartPage/CartPage";
14 -//false logged in user can't go inside 13 +import HistoryPage from "./views/HistoryPage/HistoryPage";
14 +import adminPage from "./views/adminPage/adminPage";
15 15
16 function App() { 16 function App() {
17 return ( 17 return (
18 - <Suspense fallback={(<div>Loading...</div>)}> 18 + <Suspense fallback={<div>Loading...</div>}>
19 <NavBar /> 19 <NavBar />
20 - <div style={{ paddingTop: '69px', minHeight: 'calc(100vh - 80px)' }}> 20 + <div style={{ paddingTop: "75px", minHeight: "calc(100vh - 80px)" }}>
21 <Switch> 21 <Switch>
22 <Route exact path="/" component={Auth(LandingPage, null)} /> 22 <Route exact path="/" component={Auth(LandingPage, null)} />
23 <Route exact path="/login" component={Auth(LoginPage, false)} /> 23 <Route exact path="/login" component={Auth(LoginPage, false)} />
24 <Route exact path="/register" component={Auth(RegisterPage, false)} /> 24 <Route exact path="/register" component={Auth(RegisterPage, false)} />
25 - <Route exact path="/upload" component={Auth(UploadPage, true)} /> 25 + <Route exact path="/product/upload" component={Auth(UploadProductPage, true)} />
26 + <Route exact path="/product/:productId" component={Auth(DetailProductPage, null)} />
27 + <Route exact path="/user/cart" component={Auth(CartPage, true)} />
28 + <Route exact path="/history" component={Auth(HistoryPage, true)} />
29 + <Route exact path="/admin" component={Auth(adminPage, true)} />
26 </Switch> 30 </Switch>
27 </div> 31 </div>
28 <Footer /> 32 <Footer />
......
1 +#test {
2 + width: 300px;
3 + height: 200px;
4 + border: 1px solid lightgray;
5 + border-radius: 1em;
6 + display: flex;
7 + position: relative;
8 +}
9 +#alert {
10 + width: 300px;
11 + height: 200px;
12 + border: 1px solid lightgray;
13 + border-radius: 1em;
14 + display: flex;
15 + justify-content: center;
16 + align-items: center;
17 +}
18 +
19 +#test:hover {
20 + animation: del 0.2s forwards;
21 +}
22 +
23 +@keyframes del {
24 + to {
25 + filter: brightness(50%);
26 + }
27 +}
28 +
29 +#alert {
30 + position: relative;
31 + bottom: 200px;
32 + opacity: 0;
33 +}
34 +
35 +#alert:hover {
36 + background-color: black;
37 + color: white;
38 + animation: fadeInUP 1s forwards;
39 +}
40 +
41 +@keyframes fadeInUP {
42 + to {
43 + opacity: 0.5;
44 + }
45 +}
1 +import React, { useState } from "react";
2 +import Dropzone from "react-dropzone";
3 +import { Icon } from "antd";
4 +import Axios from "axios";
5 +import "./FileUpload.css";
6 +
7 +function FileUpload(props) {
8 + const [Images, setImages] = useState([]);
9 +
10 + const onDrop = files => {
11 + let formData = new FormData();
12 + const config = {
13 + header: { "content-type": "multipart/form-data" },
14 + };
15 + formData.append("file", files[0]);
16 + Axios.post("/api/product/uploadImage", formData, config).then(response => {
17 + if (response.data.success) {
18 + setImages([...Images, response.data.image]);
19 + props.refreshFunction([...Images, response.data.image]);
20 + } else {
21 + alert("Failed to save the Image in Server");
22 + }
23 + });
24 + };
25 +
26 + const onDelete = image => {
27 + const currentIndex = Images.indexOf(image);
28 +
29 + let newImages = [...Images];
30 + newImages.splice(currentIndex, 1);
31 +
32 + setImages(newImages);
33 + props.refreshFunction(newImages);
34 + };
35 +
36 + return (
37 + <div style={{ display: "flex", justifyContent: "space-between" }}>
38 + <Dropzone onDrop={onDrop} multiple={false} maxSize={800000000}>
39 + {({ getRootProps, getInputProps }) => (
40 + <div
41 + style={{
42 + width: "300px",
43 + height: "240px",
44 + border: "1px solid lightgray",
45 + borderRadius: '15px',
46 + display: "flex",
47 + alignItems: "center",
48 + justifyContent: "center",
49 + }}
50 + {...getRootProps()}
51 + >
52 + {console.log("getRootProps", { ...getRootProps() })}
53 + {console.log("getInputProps", { ...getInputProps() })}
54 + <input {...getInputProps()} />
55 + <Icon type="plus" style={{ fontSize: "3rem" }} />
56 + </div>
57 + )}
58 + </Dropzone>
59 +
60 + <div style={{ display: "flex", width: "350px", height: "240px", overflowX: "scroll" }}>
61 + {Images.map((image, index) => (
62 + <div onClick={() => onDelete(image)}>
63 + <img id="test" src={`http://localhost:5000/${image}`} />
64 + <div id="alert">클릭하면 삭제돼요!</div>
65 + </div>
66 + ))}
67 + </div>
68 + </div>
69 + );
70 +}
71 +
72 +export default FileUpload;
1 +import React from "react";
2 +import { Carousel } from "antd";
3 +
4 +function ImageSlider(props) {
5 + return (
6 + <div>
7 + <Carousel autoplay>
8 + {props.images.map((image, index) => (
9 + <div key={index}>
10 + <img style={{ width: "100%", maxWidth: "300px", height: "300px" }} src={`http://localhost:5000/${image}`} alt="productImage" />
11 + </div>
12 + ))}
13 + </Carousel>
14 + </div>
15 + );
16 +}
17 +
18 +export default ImageSlider;
1 +#test {
2 + width: 300px;
3 + height: 200px;
4 + border: 1px solid rgb(155, 155, 155);
5 + border-radius: 1em;
6 + display: flex;
7 + position: relative;
8 +}
9 +#alert {
10 + width: 300px;
11 + height: 200px;
12 + border: 1px solid rgb(155, 155, 155);
13 + border-radius: 1em;
14 + display: flex;
15 + justify-content: center;
16 + align-items: center;
17 +}
18 +
19 +#test:hover {
20 + animation: del 0.7s forwards;
21 +}
22 +
23 +@keyframes del {
24 + to {
25 + filter: brightness(50%);
26 + }
27 +}
28 +
29 +#alert {
30 + position: relative;
31 + bottom: 200px;
32 + opacity: 0;
33 +}
34 +
35 +#alert:hover {
36 + background-color: black;
37 + color: white;
38 + animation: fadeInUP 0.2s forwards;
39 +}
40 +
41 +@keyframes fadeInUP {
42 + to {
43 + opacity: 0.5;
44 + }
45 +}
...@@ -2,6 +2,7 @@ import React from 'react' ...@@ -2,6 +2,7 @@ import React from 'react'
2 import Dropzone from 'react-dropzone' 2 import Dropzone from 'react-dropzone'
3 import axios from 'axios'; 3 import axios from 'axios';
4 import { useState } from 'react'; 4 import { useState } from 'react';
5 +import './ImageUpload.css'
5 6
6 function ImageUpload(props) { 7 function ImageUpload(props) {
7 8
...@@ -51,13 +52,14 @@ function ImageUpload(props) { ...@@ -51,13 +52,14 @@ function ImageUpload(props) {
51 <Dropzone onDrop={imageDropEvent}> 52 <Dropzone onDrop={imageDropEvent}>
52 {({getRootProps, getInputProps}) => ( 53 {({getRootProps, getInputProps}) => (
53 <section> 54 <section>
55 + {/* Dropzone */}
54 <div style={{ 56 <div style={{
55 width: 300, height: 200, border: '1px solid lightgray', borderRadius: '1em', display: 'flex', 57 width: 300, height: 200, border: '1px solid lightgray', borderRadius: '1em', display: 'flex',
56 alignItems: 'center', textAlign: 'center', justifyContent: 'center' 58 alignItems: 'center', textAlign: 'center', justifyContent: 'center'
57 }} 59 }}
58 {...getRootProps()}> 60 {...getRootProps()}>
59 <input {...getInputProps()} /> 61 <input {...getInputProps()} />
60 - <p>이곳을 클릭하여 <br/> 상품 사진을 업로드 해주세요.</p> 62 + <p>이곳을 클릭하여<br/>상품 사진을 업로드 해주세요.</p>
61 </div> 63 </div>
62 </section> 64 </section>
63 )} 65 )}
...@@ -72,11 +74,10 @@ function ImageUpload(props) { ...@@ -72,11 +74,10 @@ function ImageUpload(props) {
72 {Images.map((image, index) => ( 74 {Images.map((image, index) => (
73 75
74 <div onClick={ () => deleteEvent(image) } 76 <div onClick={ () => deleteEvent(image) }
75 - key={index}> 77 + key={index}>
76 - <img style={{ 78 + <img id="test" src={`http://localhost:5000/${image}`} />
77 - width: '300px', height: '200px', border: '1px solid lightgray', 79 + <div id="alert">클릭하면 삭제돼요!</div>
78 - borderRadius: '1em', display: 'flex'}} 80 +
79 - src={`http://localhost:5000/${image}`} />
80 </div> 81 </div>
81 ))} 82 ))}
82 </div> 83 </div>
......
1 +import React from 'react';
2 +import PaypalExpressBtn from 'react-paypal-express-checkout';
3 +
4 +export default class Paypal extends React.Component {
5 + render() {
6 + const onSuccess = (payment) => {
7 + // Congratulation, it came here means everything's fine!
8 + console.log("The payment was succeeded!", payment);
9 + // You can bind the "payment" object's value to your state or props or whatever here, please see below for sample returned data
10 + this.props.onSuccess(payment);
11 + }
12 +
13 + const onCancel = (data) => {
14 + // User pressed "cancel" or close Paypal's popup!
15 + console.log('The payment was cancelled!', data);
16 + // You can bind the "data" object's value to your state or props or whatever here, please see below for sample returned data
17 + }
18 +
19 + const onError = (err) => {
20 + // The main Paypal's script cannot be loaded or somethings block the loading of that script!
21 + console.log("Error!", err);
22 + // Because the Paypal's main script is loaded asynchronously from "https://www.paypalobjects.com/api/checkout.js"
23 + // => sometimes it may take about 0.5 second for everything to get set, or for the button to appear
24 + }
25 +
26 + let env = 'sandbox'; // you can set here to 'production' for production
27 + let currency = 'USD'; // or you can set this value from your props or state
28 + let total = this.props.toPay; // same as above, this is the total amount (based on currency) to be paid by using Paypal express checkout
29 + // Document on Paypal's currency code: https://developer.paypal.com/docs/classic/api/currency_codes/
30 +
31 + const client = {
32 + sandbox: 'ASbCsyjZeUzpNCkVbbqseQzcXivFRRoyPfpJK24688vFvIchTR-CCK79Ao5FB6zgqIO2r5Xw-a4Xh-44',
33 + production: 'YOUR-PRODUCTION-APP-ID',
34 + }
35 + // In order to get production's app-ID, you will have to send your app to Paypal for approval first
36 + // For sandbox app-ID (after logging into your developer account, please locate the "REST API apps" section, click "Create App"):
37 + // => https://developer.paypal.com/docs/classic/lifecycle/sb_credentials/
38 + // For production app-ID:
39 + // => https://developer.paypal.com/docs/classic/lifecycle/goingLive/
40 +
41 + // NB. You can also have many Paypal express checkout buttons on page, just pass in the correct amount and they will work!
42 + return (
43 + <PaypalExpressBtn
44 + env={env}
45 + client={client}
46 + currency={currency}
47 + total={total}
48 + onError={onError}
49 + onSuccess={onSuccess}
50 + onCancel={onCancel}
51 + style={{
52 + size:'large',
53 + color:'blue',
54 + shape: 'rect',
55 + label: 'checkout'
56 + }}
57 + />
58 + );
59 + }
60 +}
...\ No newline at end of file ...\ No newline at end of file
1 +import React, { useEffect, useState } from "react";
2 +import { useDispatch } from "react-redux";
3 +import { getCartItems, removeCartItem, onSuccessBuy } from "../../../_actions/user_actions";
4 +import UserCardBlock from "./Sections/UserCardBlock";
5 +import { Result, Empty } from "antd";
6 +import Axios from "axios";
7 +import Paypal from "../../utils/Paypal";
8 +import { Container } from "react-bootstrap";
9 +
10 +function CartPage(props) {
11 + const dispatch = useDispatch();
12 + const [Total, setTotal] = useState(0);
13 + const [ShowTotal, setShowTotal] = useState(false);
14 + const [ShowSuccess, setShowSuccess] = useState(false);
15 +
16 + useEffect(() => {
17 + let cartItems = [];
18 + if (props.user.userData && props.user.userData.cart) {
19 + if (props.user.userData.cart.length > 0) {
20 + props.user.userData.cart.forEach(item => {
21 + cartItems.push(item.id);
22 + });
23 + dispatch(getCartItems(cartItems, props.user.userData.cart)).then(response => {
24 + if (response.payload.length > 0) {
25 + calculateTotal(response.payload);
26 + }
27 + });
28 + }
29 + }
30 + }, [props.user.userData]);
31 +
32 + const calculateTotal = cartDetail => {
33 + let total = 0;
34 +
35 + cartDetail.map(item => {
36 + total += parseInt(item.price, 10) * item.quantity;
37 + });
38 +
39 + setTotal(total);
40 + setShowTotal(true);
41 + };
42 +
43 + const removeFromCart = productId => {
44 + dispatch(removeCartItem(productId)).then(response => {
45 + if (response.payload.cartDetail.length <= 0) {
46 + setShowTotal(false);
47 + } else {
48 + calculateTotal(response.payload.cartDetail);
49 + }
50 + });
51 + };
52 +
53 + const transactionSuccess = data => {
54 + dispatch(
55 + onSuccessBuy({
56 + cartDetail: props.user.cartDetail,
57 + paymentData: data,
58 + })
59 + ).then(response => {
60 + if (response.payload.success) {
61 + setShowSuccess(true);
62 + setShowTotal(false);
63 + }
64 + });
65 + };
66 +
67 + const transactionError = () => {
68 + console.log("Paypal error");
69 + };
70 +
71 + const transactionCanceled = () => {
72 + console.log("Transaction canceled");
73 + };
74 +
75 + return (
76 + <div style={{ width: "85%", margin: "3rem auto" }}>
77 + <h1>장바구니</h1>
78 + <div style={{ marginTop: "30px" }}>
79 + <UserCardBlock products={props.user.cartDetail} removeItem={removeFromCart} />
80 + {ShowTotal ? (
81 + <div style={{ marginTop: "3rem", textAlign: "right" }}>
82 + <h2> 금액: ${Total} </h2>
83 + </div>
84 + ) : ShowSuccess ? (
85 + <Result status="success" title="Successfully Purchased Items" />
86 + ) : (
87 + <div
88 + style={{
89 + width: "100%",
90 + display: "flex",
91 + flexDirection: "column",
92 + justifyContent: "center",
93 + }}
94 + >
95 + <br />
96 + <Empty description={false} />
97 + <p>장바구니가 비었습니다.</p>
98 + </div>
99 + )}
100 + </div>
101 +
102 + {ShowTotal && (
103 + <Container style={{ width: "max-content", marginTop: "100px" }}>
104 + <Paypal sty toPay={Total} onSuccess={transactionSuccess} transactionError={transactionError} transactionCanceled={transactionCanceled} />
105 + </Container>
106 + )}
107 + </div>
108 + );
109 +}
110 +
111 +export default CartPage;
1 +import React from "react";
2 +
3 +function UserCardBlock(props) {
4 + const renderCartImage = images => {
5 + if (images.length > 0) {
6 + let image = images[0];
7 + return `http://localhost:5000/${image}`;
8 + }
9 + };
10 +
11 + const renderItems = () =>
12 + props.products &&
13 + props.products.map(product => (
14 + <tr key={product._id} style={{ margin: "auto", backgroundColor: "white" }}>
15 + <td style={{ margin: "auto", textAlign: "center" }}>
16 + <img style={{ width: "70px" }} alt="product" src={renderCartImage(product.images)} />
17 + </td>
18 + <td style={{ margin: "auto", textAlign: "center" }}>{product.title}</td>
19 + <td style={{ margin: "auto", textAlign: "center" }}>{product.quantity} EA</td>
20 + <td style={{ margin: "auto", textAlign: "center" }}>$ {product.price} </td>
21 + <td style={{ margin: "auto", textAlign: "center" }}>
22 + <button onClick={() => props.removeItem(product._id)}></button>
23 + </td>
24 + </tr>
25 + ));
26 +
27 + return (
28 + <div>
29 + <table>
30 + <thead>
31 + <tr style={{ textAlign: "center" }}>
32 + <th>상품 이미지</th>
33 + <th>상품명</th>
34 + <th>개수</th>
35 + <th>가격</th>
36 + <th>장바구니에서 삭제하기</th>
37 + </tr>
38 + </thead>
39 + <tbody>{renderItems()}</tbody>
40 + </table>
41 + </div>
42 + );
43 +}
44 +
45 +export default UserCardBlock;
1 +import React, { useEffect, useState } from 'react'
2 +import Axios from 'axios'
3 +import { Row, Col } from 'antd';
4 +import ProductImage from './Sections/ProductImage';
5 +import ProductInfo from './Sections/ProductInfo';
6 +import { addToCart } from '../../../_actions/user_actions';
7 +import { useDispatch } from 'react-redux';
8 +function DetailProductPage(props) {
9 + const dispatch = useDispatch();
10 + const productId = props.match.params.productId
11 + const [Product, setProduct] = useState([])
12 +
13 + useEffect(() => {
14 + Axios.get(`/api/product/products_by_id?id=${productId}&type=single`)
15 + .then(response => {
16 + setProduct(response.data[0])
17 + })
18 +
19 + }, [])
20 +
21 + const addToCartHandler = (productId) => {
22 + dispatch(addToCart(productId))
23 +
24 + }
25 +
26 + return (
27 + <div className="postPage" style={{ width: '100%', padding: '3rem 4rem' }}>
28 +
29 + <div style={{ display: 'flex', justifyContent: 'center' }}>
30 + <h1>{Product.title}</h1>
31 + </div>
32 +
33 + <br />
34 +
35 + <Row gutter={[16, 16]} >
36 + <Col lg={12} xs={24}>
37 + <ProductImage detail={Product} style={{width :"300px"}} />
38 + </Col>
39 + <Col lg={12} xs={24}>
40 + <ProductInfo
41 + addToCart={addToCartHandler}
42 + detail={Product} />
43 + </Col>
44 + </Row>
45 + </div>
46 + )
47 +}
48 +
49 +export default DetailProductPage
1 +import React, { useEffect, useState } from 'react'
2 +import ImageGallery from 'react-image-gallery';
3 +
4 +function ProductImage(props) {
5 + const [Images, setImages] = useState([])
6 +
7 + useEffect(() => {
8 + if (props.detail.images && props.detail.images.length > 0) {
9 + let images = [];
10 +
11 + props.detail.images && props.detail.images.map(item => {
12 + images.push({
13 + original: `http://localhost:5000/${item}`,
14 + thumbnail: `http://localhost:5000/${item}`
15 + })
16 + })
17 + setImages(images)
18 + }
19 + }, [props.detail])
20 +
21 + return (
22 + <div>
23 + <ImageGallery showFullscreenButton={false} showPlayButton={false} items={Images} />
24 + </div>
25 + )
26 +}
27 +
28 +export default ProductImage
1 +import React, { useEffect, useState } from "react";
2 +import { Button, Descriptions } from "antd";
3 +import { Container } from "react-bootstrap";
4 +
5 +function ProductInfo(props) {
6 + const [Product, setProduct] = useState({});
7 +
8 + useEffect(() => {
9 + setProduct(props.detail);
10 + }, [props.detail]);
11 +
12 + const addToCarthandler = () => {
13 + props.addToCart(props.detail._id);
14 + };
15 +
16 + return (
17 +
18 + <Container style={{ paddingTop: "100px" }}>
19 + <Container style={{ textAlign: "center" }}>
20 + {/* <h7>{Product.description}</h7><br/> */}
21 + <h3>가격 : {Product.price}000 </h3>
22 + </Container>
23 +
24 + <br />
25 + <br />
26 + <div style={{ display: "flex", justifyContent: "center" }}>
27 + <Button size="large" shape="round" type="danger" onClick={addToCarthandler}>
28 + <a href="/user/cart">
29 + 장바구니에 담기
30 + </a>
31 + </Button>
32 + </div>
33 + </Container>
34 + );
35 +}
36 +
37 +export default ProductInfo;
1 +import React from 'react'
2 +import axios from 'axios'
3 +import {useEffect, useState} from 'react'
4 +import ProductImage from './Sections/ProductImage'
5 +import ProductInfo from './Sections/ProductInfo'
6 +import { Row, Col } from 'antd';
7 +function DetailProductPages(props) {
8 + const [Product, setProduct] = useState({})
9 + const productId = props.match.params.prouductID
10 + //console.log(props.match.params.prouductID) //->정상적으로 출력
11 +
12 + useEffect(() => {
13 + axios.get(`/api/product/products_by_id?id=${productId}&type=single`)
14 + .then(response => {
15 + if (response.data.success) {
16 + console.log(response.data)
17 + setProduct(response.data.goods[0]);
18 + }
19 + else {
20 + alert('Fail.');
21 + }
22 + })
23 + },[])
24 +
25 + return (
26 + <div style={{width:'100%', padding:'3rem 4rem'}}>
27 + <div style={{ display: 'flex', justifyContent: 'center' }}>
28 + <h1>{Product.title}</h1>
29 + </div>
30 +
31 + <br />
32 + <Row gutter={[16, 16]}>
33 + <Col lg={12} sm={24}>
34 + <ProductImage detail={Product} />
35 + </Col>
36 + <Col lg={12} sm={24}>
37 + <ProductImage />
38 + </Col>
39 + </Row>
40 + {/* image */}
41 +
42 +
43 + {/* info */}
44 + <ProductInfo />
45 + </div>
46 + )
47 +}
48 +
49 +export default DetailProductPages
1 +import React from 'react'
2 +import ImageGallery from 'react-image-gallery'
3 +import { useEffect, useState } from 'react'
4 +
5 +function ProductImage(props) {
6 +
7 + const [Images, setImages] = useState([])
8 +
9 +
10 +
11 + useEffect(() => {
12 + console.log('now ::::::: ', props.goods)
13 + let images = []
14 + if (props.goods.images && props.goods.images.length > 0) {
15 +
16 + props.goods.images.map(item => {
17 + images.push({
18 + original: `http://localhost:5000/${item}`,
19 + thumbnail: `http://localhost:5000/${item}`
20 + })
21 + })
22 + setImages(images)
23 + }
24 + }, [props.goods])
25 + return (
26 + <div>
27 + <ImageGallery items={Images} />
28 + </div>
29 + )
30 + // return (
31 + // <div>
32 + // ..
33 + // </div>
34 + // )
35 +
36 +
37 +}
38 +
39 +export default ProductImage
1 +import React from 'react'
2 +
3 +function ProductInfo() {
4 + return (
5 + <div>
6 + info
7 + </div>
8 + )
9 +}
10 +
11 +export default ProductInfo
1 -import React from 'react' 1 +import React from "react";
2 -import {Icon} from 'antd'; 2 +import { Icon } from "antd";
3 3
4 function Footer() { 4 function Footer() {
5 - return ( 5 + return (
6 - <div style={{ 6 + <div
7 - height: '80px', display: 'flex', 7 + style={{
8 - flexDirection: 'column', alignItems: 'center', 8 + height: "80px",
9 - justifyContent: 'center', fontSize:'1rem' 9 + display: "flex",
10 - }}> 10 + flexDirection: "column",
11 - <p> 2018110650 박민정</p> 11 + alignItems: "center",
12 - </div> 12 + justifyContent: "center",
13 - ) 13 + fontSize: "1rem",
14 + }}
15 + >
16 + <p> Copyright © 2021 Minjeong Park All rights reserved</p>
17 + </div>
18 + );
14 } 19 }
15 20
16 -export default Footer 21 +export default Footer;
......
1 +import React from "react";
2 +
3 +function HistoryPage(props) {
4 + return (
5 + <div style={{ width: "80%", margin: "3rem auto" }}>
6 + <div style={{ textAlign: "center" }}>
7 + <h1>구매내역</h1>
8 + </div>
9 + <br />
10 +
11 + <table>
12 + <thead>
13 + <tr>
14 + <th style={{ textAlign: "center" }}>구매 ID</th>
15 + <th style={{ textAlign: "center" }}>가격</th>
16 + <th style={{ textAlign: "center" }}>수량</th>
17 + <th style={{ textAlign: "center" }}>구매 날짜</th>
18 + </tr>
19 + </thead>
20 +
21 + <tbody>
22 + {props.user.userData &&
23 + props.user.userData.history &&
24 + props.user.userData.history.map(item => (
25 + <tr key={item.id}>
26 + <td style={{ textAlign: "center", margin: "auto" }}>{item.id}</td>
27 + <td style={{ textAlign: "center", margin: "auto" }}>{item.price}</td>
28 + <td style={{ textAlign: "center", margin: "auto" }}>{item.quantity}</td>
29 + <td style={{ textAlign: "center", margin: "auto" }}>{item.dateOfPurchase}</td>
30 + </tr>
31 + ))}
32 + </tbody>
33 + </table>
34 + </div>
35 + );
36 +}
37 +
38 +export default HistoryPage;
1 -import React from 'react' 1 +import React, { useEffect, useState } from "react";
2 -import { FaCode } from "react-icons/fa"; 2 +import Axios from "axios";
3 +import { Icon, Col, Card, Row } from "antd";
4 +import ImageSlider from "../../utils/ImageSlider";
5 +import CheckBox from "./Sections/CheckBox";
6 +import { medicines, price } from "./Sections/Datas";
7 +import SearchFeature from "./Sections/SearchFeature";
8 +import { Container } from "react-bootstrap";
9 +
10 +const { Meta } = Card;
3 11
4 function LandingPage() { 12 function LandingPage() {
13 + const [Products, setProducts] = useState([]);
14 + const [Skip, setSkip] = useState(0);
15 + const [Limit, setLimit] = useState(8);
16 + const [PostSize, setPostSize] = useState();
17 + const [SearchTerms, setSearchTerms] = useState("");
18 +
19 + const [Filters, setFilters] = useState({
20 + medicines: [],
21 + price: [],
22 + });
23 +
24 + useEffect(() => {
25 + const variables = {
26 + skip: Skip,
27 + limit: Limit,
28 + };
29 +
30 + getProducts(variables);
31 + }, []);
32 +
33 + const getProducts = variables => {
34 + Axios.post("/api/product/getProducts", variables).then(response => {
35 + if (response.data.success) {
36 + if (variables.loadMore) {
37 + setProducts([...Products, ...response.data.products]);
38 + } else {
39 + setProducts(response.data.products);
40 + }
41 + setPostSize(response.data.postSize);
42 + } else {
43 + alert("실패하였습니다.");
44 + }
45 + });
46 + };
47 +
48 + const onLoadMore = () => {
49 + let skip = Skip + Limit;
50 +
51 + const variables = {
52 + skip: skip,
53 + limit: Limit,
54 + loadMore: true,
55 + filters: Filters,
56 + searchTerm: SearchTerms,
57 + };
58 + getProducts(variables);
59 + setSkip(skip);
60 + };
61 +
62 + const renderCards = Products.map((product, index) => {
5 return ( 63 return (
6 - <> 64 + <Col style={{ marginTop: "30px" }} lg={6} md={8} xs={24}>
7 - <div className="app"> 65 + <Card
8 - .. 66 + style={{ margin: "5px" }}
9 - </div> 67 + hoverable={true}
10 - 68 + cover={
11 - </> 69 + <a href={`/product/${product._id}`}>
12 - ) 70 + <ImageSlider images={product.images} />
71 + </a>
72 + }
73 + >
74 + <Meta title={product.title} description={`${product.price}000원`} />
75 + </Card>
76 + </Col>
77 + );
78 + });
79 +
80 + const showFilteredResults = filters => {
81 + const variables = {
82 + skip: 0,
83 + limit: Limit,
84 + filters: filters,
85 + };
86 + getProducts(variables);
87 + setSkip(0);
88 + };
89 +
90 + const handlePrice = value => {
91 + const data = price;
92 + let array = [];
93 +
94 + for (let key in data) {
95 + if (data[key]._id === parseInt(value, 10)) {
96 + array = data[key].array;
97 + }
98 + }
99 + console.log("array", array);
100 + return array;
101 + };
102 +
103 + const handleFilters = (filters, category) => {
104 + const newFilters = { ...Filters };
105 +
106 + newFilters[category] = filters;
107 +
108 + if (category === "price") {
109 + let priceValues = handlePrice(filters);
110 + newFilters[category] = priceValues;
111 + }
112 +
113 + console.log(newFilters);
114 +
115 + showFilteredResults(newFilters);
116 + setFilters(newFilters);
117 + };
118 +
119 + const updateSearchTerms = newSearchTerm => {
120 + const variables = {
121 + skip: 0,
122 + limit: Limit,
123 + filters: Filters,
124 + searchTerm: newSearchTerm,
125 + };
126 +
127 + setSkip(0);
128 + setSearchTerms(newSearchTerm);
129 +
130 + getProducts(variables);
131 + };
132 +
133 + return (
134 + <div style={{ width: "75%", margin: "3rem auto" }}>
135 + <div style={{ textAlign: "center" }}>
136 + <img src={"/whatmedicine.png"} style={{ width: "500px" }} />
137 + {/* <h2>
138 + {" "}
139 + <Icon type="alert" />
140 + &nbsp; 어떤 약이 필요하신가요?&nbsp;<Icon type="alert" />{" "}
141 + </h2> */}
142 + </div>
143 +
144 +
145 + <Container style={{ width: "50%" }}>
146 + <CheckBox list={medicines} handleFilters={filters => handleFilters(filters, "medicines")} />
147 + </Container>
148 +
149 + {/* Search */}
150 +
151 + {Products.length === 0 ? (
152 + <div style={{ display: "flex", height: "300px", justifyContent: "center", alignItems: "center" }}>
153 +
154 +
155 + </div>
156 + ) : (
157 + <div>
158 + <Row gutter={[16, 16]}>{renderCards}</Row>
159 + </div>
160 + )}
161 + <br />
162 + <br />
163 +
164 + {PostSize >= Limit && (
165 + <div style={{ display: "flex", justifyContent: "center" }}>
166 + <button onClick={onLoadMore}>Load More</button>
167 + </div>
168 + )}
169 + </div>
170 + );
13 } 171 }
14 172
15 -export default LandingPage 173 +export default LandingPage;
......
1 +import React, { useState } from 'react'
2 +import { Checkbox, Collapse } from 'antd';
3 +
4 +const { Panel } = Collapse
5 +
6 +
7 +function CheckBox(props) {
8 +
9 + const [Checked, setChecked] = useState([])
10 +
11 + const handleToggle = (value) => {
12 +
13 + const currentIndex = Checked.indexOf(value);
14 + const newChecked = [...Checked];
15 +
16 + if (currentIndex === -1) {
17 + newChecked.push(value)
18 + } else {
19 + newChecked.splice(currentIndex, 1)
20 + }
21 +
22 + setChecked(newChecked)
23 + props.handleFilters(newChecked)
24 +
25 + }
26 +
27 + const renderCheckboxLists = () => props.list && props.list.map((value, index) => (
28 + <React.Fragment key={index}>
29 + <Checkbox
30 + onChange={() => handleToggle(value._id)}
31 + type="checkbox"
32 + checked={Checked.indexOf(value._id) === -1 ? false : true}
33 + />&nbsp;&nbsp;
34 + <span>{value.name}</span>
35 + </React.Fragment>
36 + ))
37 +
38 + return (
39 + <div>
40 + <Collapse defaultActiveKey={['0']} >
41 + <Panel header="약 종류" key="1">
42 + {renderCheckboxLists()}
43 + </Panel>
44 + </Collapse>
45 + </div>
46 + )
47 +}
48 +
49 +export default CheckBox
...\ No newline at end of file ...\ No newline at end of file
1 +const symtoms = [
2 + {
3 + "_id": 0,
4 + "name": "전체"
5 + },
6 + {
7 + "_id": 1,
8 + "name": "진통제"
9 + },
10 + {
11 + "_id": 2,
12 + "name": "소화제"
13 + },
14 + {
15 + "_id": 3,
16 + "name": "감기약"
17 + },
18 + {
19 + "_id": 4,
20 + "name": "해열제"
21 + },
22 + {
23 + "_id": 5,
24 + "name": "파스류"
25 + },
26 + {
27 + "_id": 6,
28 + "name": "상처치료"
29 + },
30 + {
31 + "_id": 7,
32 + "name": "기타"
33 + }
34 +]
35 +
36 +export {
37 + symtoms
38 +}
...\ No newline at end of file ...\ No newline at end of file
1 +
2 +
3 +const medicines = [
4 + { _id: 0, name: "전체" },
5 + {
6 + _id: 1,
7 + name: "진통제",
8 + },
9 + {
10 + _id: 2,
11 + name: "소화제",
12 + },
13 + {
14 + _id: 3,
15 + name: "감기약",
16 + },
17 + {
18 + _id: 4,
19 + name: "해열제",
20 + },
21 + {
22 + _id: 5,
23 + name: "파스류",
24 + },
25 + {
26 + _id: 6,
27 + name: "상처치료",
28 + },
29 + {
30 + _id: 7,
31 + name: "기타",
32 + },
33 +];
34 +
35 +
36 +
37 +
38 +const price = [
39 + {
40 + _id: 0,
41 + name: "Any",
42 + array: [],
43 + },
44 + {
45 + _id: 1,
46 + name: "배달비 무료",
47 + array: [0],
48 + },
49 + {
50 + _id: 2,
51 + name: "배달비 500원 ~ 1000원",
52 + array: [500, 1000],
53 + },
54 + {
55 + _id: 3,
56 + name: "배달비 1000원 ~ 2000원",
57 + array: [1001, 2000],
58 + },
59 + {
60 + _id: 4,
61 + name: "배달비 200원 ~ 3000원",
62 + array: [2001, 3000],
63 + },
64 + {
65 + _id: 5,
66 + name: "3000원 이상",
67 + array: [3000, 1500000],
68 + },
69 +];
70 +
71 +export { price, medicines };
1 +import React from 'react'
2 +
3 +function RadioBox() {
4 + return (
5 + <div>
6 +
7 + </div>
8 + )
9 +}
10 +
11 +export default RadioBox
1 +import React, { useState } from "react";
2 +import { Input } from "antd";
3 +
4 +const { Search } = Input;
5 +
6 +function SearchFeature(props) {
7 + const [SearchTerms, setSearchTerms] = useState("");
8 +
9 + const onChangeSearch = event => {
10 + setSearchTerms(event.currentTarget.value);
11 +
12 + props.refreshFunction(event.currentTarget.value);
13 + };
14 +
15 + return (
16 + <div style={{ margin: "auto" }}>
17 + <Search value={SearchTerms} onChange={onChangeSearch} placeholder="상품명" />
18 + </div>
19 + );
20 +}
21 +
22 +export default SearchFeature;
1 import React, { useState } from "react"; 1 import React, { useState } from "react";
2 import { withRouter } from "react-router-dom"; 2 import { withRouter } from "react-router-dom";
3 import { loginUser } from "../../../_actions/user_actions"; 3 import { loginUser } from "../../../_actions/user_actions";
4 -import { Formik } from 'formik'; 4 +import { Formik } from "formik";
5 -import * as Yup from 'yup'; 5 +import * as Yup from "yup";
6 -import { Form, Icon, Input, Button, Checkbox, Typography } from 'antd'; 6 +import { Form, Icon, Input, Button, Checkbox, Typography } from "antd";
7 import { useDispatch } from "react-redux"; 7 import { useDispatch } from "react-redux";
8 8
9 const { Title } = Typography; 9 const { Title } = Typography;
10 10
11 function LoginPage(props) { 11 function LoginPage(props) {
12 const dispatch = useDispatch(); 12 const dispatch = useDispatch();
13 - //const rememberMeChecked = localStorage.getItem("rememberMe") ? true : false; 13 + const rememberMeChecked = localStorage.getItem("rememberMe") ? true : false;
14 14
15 - const [Error, setError] = useState('') 15 + const [formErrorMessage, setFormErrorMessage] = useState("");
16 - //const [rememberMe, setRememberMe] = useState(rememberMeChecked) 16 + const [rememberMe, setRememberMe] = useState(rememberMeChecked);
17 17
18 - // const handleRememberMe = () => { 18 + const handleRememberMe = () => {
19 - // setRememberMe(!rememberMe) 19 + setRememberMe(!rememberMe);
20 - // }; 20 + };
21 21
22 - //const initialEmail = localStorage.getItem("rememberMe") ? localStorage.getItem("rememberMe") : '';
23 22
24 return ( 23 return (
25 <Formik 24 <Formik
26 initialValues={{ 25 initialValues={{
27 - email: '', 26 + email: "",
28 - password: '', 27 + password: "",
29 }} 28 }}
30 - // validationSchema={Yup.object().shape({ 29 + validationSchema={Yup.object().shape({
31 - // email: Yup.string() 30 + email: Yup.string().email("이메일이 유효하지 않습니다.").required("이메일을 입력해주세요."),
32 - // .email('Email is invalid') 31 + password: Yup.string().min(5, "비밀번호가 너무 짧습니다.").required("비밀번호를 입력해주세요."),
33 - // .required('Email is required'), 32 + })}
34 - // password: Yup.string()
35 - // .min(6, 'Password must be at least 6 characters')
36 - // .required('Password is required'),
37 - // })}
38 onSubmit={(values, { setSubmitting }) => { 33 onSubmit={(values, { setSubmitting }) => {
39 setTimeout(() => { 34 setTimeout(() => {
40 let dataToSubmit = { 35 let dataToSubmit = {
41 email: values.email, 36 email: values.email,
42 - password: values.password 37 + password: values.password,
43 }; 38 };
44 39
45 dispatch(loginUser(dataToSubmit)) 40 dispatch(loginUser(dataToSubmit))
46 .then(response => { 41 .then(response => {
47 if (response.payload.loginSuccess) { 42 if (response.payload.loginSuccess) {
48 - window.localStorage.setItem('userId', response.payload.userId); 43 + window.localStorage.setItem("userId", response.payload.userId);
49 - // if (rememberMe === true) { 44 + if (rememberMe === true) {
50 - // window.localStorage.setItem('rememberMe', values.id); 45 + window.localStorage.setItem("rememberMe", values.id);
51 - // } else { 46 + } else {
52 - // localStorage.removeItem('rememberMe'); 47 + localStorage.removeItem("rememberMe");
53 - // } 48 + }
54 props.history.push("/"); 49 props.history.push("/");
55 } else { 50 } else {
56 - setError('이메일 또는 비밀번호가 올바르지 않습니다.') 51 + setFormErrorMessage("Check out your Account or Password again");
57 } 52 }
58 }) 53 })
59 .catch(err => { 54 .catch(err => {
60 - setError('이메일 또는 비밀번호가 올바르지 않습니다.') 55 + setFormErrorMessage("Check out your Account or Password again");
61 setTimeout(() => { 56 setTimeout(() => {
62 - setError("") 57 + setFormErrorMessage("");
63 }, 3000); 58 }, 3000);
64 }); 59 });
65 setSubmitting(false); 60 setSubmitting(false);
...@@ -67,74 +62,51 @@ function LoginPage(props) { ...@@ -67,74 +62,51 @@ function LoginPage(props) {
67 }} 62 }}
68 > 63 >
69 {props => { 64 {props => {
70 - const { 65 + const { values, touched, errors, dirty, isSubmitting, handleChange, handleBlur, handleSubmit, handleReset } = props;
71 - values,
72 - touched,
73 - errors,
74 - dirty,
75 - isSubmitting,
76 - handleChange,
77 - handleBlur,
78 - handleSubmit,
79 - handleReset,
80 - } = props;
81 return ( 66 return (
82 <div className="app"> 67 <div className="app">
83 -
84 <Title level={2}>로그인</Title> 68 <Title level={2}>로그인</Title>
85 - <form onSubmit={handleSubmit} style={{ width: '350px' }}> 69 + <form onSubmit={handleSubmit} style={{ width: "350px" }}>
86 -
87 <Form.Item required> 70 <Form.Item required>
88 <Input 71 <Input
89 id="email" 72 id="email"
90 - prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />} 73 + prefix={<Icon type="user" style={{ color: "rgba(0,0,0,.25)" }} />}
91 placeholder="Enter your email" 74 placeholder="Enter your email"
92 type="email" 75 type="email"
93 value={values.email} 76 value={values.email}
94 onChange={handleChange} 77 onChange={handleChange}
95 onBlur={handleBlur} 78 onBlur={handleBlur}
96 - className={ 79 + className={errors.email && touched.email ? "text-input error" : "text-input"}
97 - errors.email && touched.email ? 'text-input error' : 'text-input'
98 - }
99 /> 80 />
100 - {errors.email && touched.email && ( 81 + {errors.email && touched.email && <div className="input-feedback">{errors.email}</div>}
101 - <div className="input-feedback">{errors.email}</div>
102 - )}
103 </Form.Item> 82 </Form.Item>
104 83
105 <Form.Item required> 84 <Form.Item required>
106 <Input 85 <Input
107 id="password" 86 id="password"
108 - prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} 87 + prefix={<Icon type="lock" style={{ color: "rgba(0,0,0,.25)" }} />}
109 placeholder="Enter your password" 88 placeholder="Enter your password"
110 type="password" 89 type="password"
111 value={values.password} 90 value={values.password}
112 onChange={handleChange} 91 onChange={handleChange}
113 onBlur={handleBlur} 92 onBlur={handleBlur}
114 - className={ 93 + className={errors.password && touched.password ? "text-input error" : "text-input"}
115 - errors.password && touched.password ? 'text-input error' : 'text-input'
116 - }
117 /> 94 />
118 - {errors.password && touched.password && ( 95 + {errors.password && touched.password && <div className="input-feedback">{errors.password}</div>}
119 - <div className="input-feedback">{errors.password}</div>
120 - )}
121 </Form.Item> 96 </Form.Item>
122 97
123 - {Error && ( 98 + {formErrorMessage && (
124 - <label ><p style={{ color: '#508DFF', fontSize: '0.8rem' }}>{Error}</p></label> 99 + <label>
100 + <p style={{ color: "#ff0000bf", fontSize: "0.7rem", border: "1px solid", padding: "1rem", borderRadius: "10px" }}>{formErrorMessage}</p>
101 + </label>
125 )} 102 )}
126 103
127 <Form.Item> 104 <Form.Item>
128 - {/* <Checkbox id="rememberMe" onChange={handleRememberMe} checked={rememberMe} >Remember me</Checkbox>
129 - <a className="login-form-forgot" href="/reset_user" style={{ float: 'right' }}>
130 - forgot password
131 - </a> */}
132 <div> 105 <div>
133 - <Button type="primary" htmlType="submit" className="login-form-button" style={{ minWidth: '100%' }} disabled={isSubmitting} onSubmit={handleSubmit}> 106 + <Button type="primary" htmlType="submit" className="login-form-button" style={{ minWidth: "100%" }} disabled={isSubmitting} onSubmit={handleSubmit}>
134 로그인 107 로그인
135 - </Button> 108 + </Button>
136 </div> 109 </div>
137 - <a href="/register" style={{ minWidth: '100%' }}>회원가입</a>
138 </Form.Item> 110 </Form.Item>
139 </form> 111 </form>
140 </div> 112 </div>
...@@ -142,8 +114,6 @@ function LoginPage(props) { ...@@ -142,8 +114,6 @@ function LoginPage(props) {
142 }} 114 }}
143 </Formik> 115 </Formik>
144 ); 116 );
145 -}; 117 +}
146 118
147 export default withRouter(LoginPage); 119 export default withRouter(LoginPage);
148 -
149 -
......
1 -import React, { useState } from 'react'; 1 +import React, { useState } from "react";
2 -import LeftMenu from './Sections/LeftMenu'; 2 +import RightMenu from "./Sections/RightMenu";
3 -import RightMenu from './Sections/RightMenu'; 3 +import { Drawer, Button, Icon } from "antd";
4 -import { Drawer, Button, Icon } from 'antd'; 4 +import "./Sections/Navbar.css";
5 -import './Sections/Navbar.css'; 5 +import { Container, Navbar, Nav } from "react-bootstrap";
6 6
7 function NavBar() { 7 function NavBar() {
8 - const [visible, setVisible] = useState(false) 8 + const [visible, setVisible] = useState(false);
9 9
10 const showDrawer = () => { 10 const showDrawer = () => {
11 - setVisible(true) 11 + setVisible(true);
12 }; 12 };
13 13
14 const onClose = () => { 14 const onClose = () => {
15 - setVisible(false) 15 + setVisible(false);
16 }; 16 };
17 17
18 return ( 18 return (
19 - <nav className="menu" style={{ position: 'fixed', zIndex: 5, width: '100%' }}> 19 + <Navbar bg="white" variant="light" style={{ position: "fixed", zIndex: 5, width: "100%", border: "1px solid lightgray" }}>
20 - <div className="menu__logo"> 20 + <Container>
21 - <a href="/">Logo</a> 21 + <Navbar.Brand href="/">
22 - </div> 22 + <img src={"/logo.png"} style={{ width: "120px", marginLeft:"50px"}} />
23 - <div className="menu__container"> 23 + </Navbar.Brand>
24 - <div className="menu_left"> 24 + <Nav className="mx-3" style={{ position: "relative", right: "0" }}>
25 - <LeftMenu mode="horizontal" /> 25 + <div className="menu__container">
26 - </div> 26 + <div className="menu_left"></div>
27 - <div className="menu_rigth"> 27 + <div className="menu_rigth">
28 - <RightMenu mode="horizontal" /> 28 + <RightMenu mode="horizontal" />
29 - </div> 29 + </div>
30 - <Button 30 + <Button className="menu__mobile-button" type="primary" onClick={showDrawer}>
31 - className="menu__mobile-button" 31 + <Icon type="align-right" />
32 - type="primary" 32 + </Button>
33 - onClick={showDrawer} 33 + <Drawer title="Basic Drawer" placement="right" className="menu_drawer" closable={false} onClose={onClose} visible={visible}>
34 - > 34 +
35 - <Icon type="align-right" /> 35 + <RightMenu mode="inline" />
36 - </Button> 36 + </Drawer>
37 - <Drawer 37 + </div>
38 - title="Basic Drawer" 38 + </Nav>
39 - placement="right" 39 + </Container>
40 - className="menu_drawer" 40 + </Navbar>
41 - closable={false} 41 + );
42 - onClose={onClose}
43 - visible={visible}
44 - >
45 - <LeftMenu mode="inline" />
46 - <RightMenu mode="inline" />
47 - </Drawer>
48 - </div>
49 - </nav>
50 - )
51 } 42 }
52 43
53 -export default NavBar
...\ No newline at end of file ...\ No newline at end of file
44 +export default NavBar;
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
50 padding: 6px; 50 padding: 6px;
51 margin-top: 8px; 51 margin-top: 8px;
52 display: none !important; /* use of important to overwrite ant-btn */ 52 display: none !important; /* use of important to overwrite ant-btn */
53 - background: #3e91f7; 53 + background: lightgray;
54 } 54 }
55 55
56 .menu_drawer .ant-drawer-body { 56 .menu_drawer .ant-drawer-body {
......
1 - 1 +/* eslint-disable jsx-a11y/anchor-is-valid */
2 -import React from 'react'; 2 +import React from "react";
3 -import { Menu } from 'antd'; 3 +import { Menu, Icon, Badge } from "antd";
4 -import axios from 'axios'; 4 +import axios from "axios";
5 -import { USER_SERVER } from '../../../Config'; 5 +import { USER_SERVER } from "../../../Config";
6 -import { withRouter } from 'react-router-dom'; 6 +import { withRouter } from "react-router-dom";
7 import { useSelector } from "react-redux"; 7 import { useSelector } from "react-redux";
8 8
9 function RightMenu(props) { 9 function RightMenu(props) {
10 - const user = useSelector(state => state.user) 10 + const user = useSelector(state => state.user);
11 11
12 const logoutHandler = () => { 12 const logoutHandler = () => {
13 axios.get(`${USER_SERVER}/logout`).then(response => { 13 axios.get(`${USER_SERVER}/logout`).then(response => {
14 if (response.status === 200) { 14 if (response.status === 200) {
15 props.history.push("/login"); 15 props.history.push("/login");
16 } else { 16 } else {
17 - alert('Log Out Failed') 17 + alert("로그아웃에 실패했습니다.");
18 } 18 }
19 }); 19 });
20 }; 20 };
21 21
22 - //console.log(user.userData);
23 - //console.log(!user.userData.isAuth);
24 22
25 if (user.userData && !user.userData.isAuth) { 23 if (user.userData && !user.userData.isAuth) {
24 +
26 return ( 25 return (
27 - <Menu mode={props.mode}> 26 + <Menu style={{ paddingTop: "10px" }} mode={props.mode}>
28 <Menu.Item key="mail"> 27 <Menu.Item key="mail">
29 - <a href="/login">로그인</a> 28 + <a href="/login"><h6>로그인</h6></a>
30 </Menu.Item> 29 </Menu.Item>
31 <Menu.Item key="app"> 30 <Menu.Item key="app">
32 - <a href="/register">회원가입</a> 31 + <a href="/register"><h6>회원가입</h6></a>
33 </Menu.Item> 32 </Menu.Item>
34 </Menu> 33 </Menu>
35 - ) 34 + );
36 } else { 35 } else {
37 return ( 36 return (
38 - <Menu mode={props.mode}> 37 + <Menu mode={props.mode} style={{ paddingTop: "5px" }}>
38 + <Menu.Item key="history">
39 + <a href="/history">
40 + <h6>구매내역</h6>
41 + </a>
42 + </Menu.Item>
43 +
39 <Menu.Item key="upload"> 44 <Menu.Item key="upload">
40 - <a href="/upload">업로드</a> 45 + <a href="/product/upload">
46 + <h6>등록하기</h6>
47 + </a>
41 </Menu.Item> 48 </Menu.Item>
49 +
50 + <Menu.Item key="cart" style={{ paddingBottom: -4 }}>
51 +
52 + <a href="/user/cart" style={{ marginRight: -22, paddingbottom: "30px", color: "#667777" }}>
53 + <Icon type="shopping-cart" style={{ fontSize: 30, marginBottom: 3 }} />
54 + </a>
55 +
56 + </Menu.Item>
57 +
42 <Menu.Item key="logout"> 58 <Menu.Item key="logout">
43 - <a onClick={logoutHandler}>로그아웃</a> 59 + <a onClick={logoutHandler}><h6>로그아웃</h6></a>
44 </Menu.Item> 60 </Menu.Item>
45 </Menu> 61 </Menu>
46 - ) 62 + );
47 } 63 }
48 } 64 }
49 65
50 export default withRouter(RightMenu); 66 export default withRouter(RightMenu);
51 -
......
1 import React from "react"; 1 import React from "react";
2 import moment from "moment"; 2 import moment from "moment";
3 -import { Formik } from 'formik'; 3 +import { Formik } from "formik";
4 -import * as Yup from 'yup'; 4 +import * as Yup from "yup";
5 import { registerUser } from "../../../_actions/user_actions"; 5 import { registerUser } from "../../../_actions/user_actions";
6 import { useDispatch } from "react-redux"; 6 import { useDispatch } from "react-redux";
7 7
8 -import { 8 +import { Form, Input, Button } from "antd";
9 - Form, 9 +const { TextArea } = Input;
10 - Input,
11 - Button,
12 -} from 'antd';
13 -
14 const formItemLayout = { 10 const formItemLayout = {
15 labelCol: { 11 labelCol: {
16 xs: { span: 24 }, 12 xs: { span: 24 },
...@@ -37,139 +33,121 @@ const tailFormItemLayout = { ...@@ -37,139 +33,121 @@ const tailFormItemLayout = {
37 function RegisterPage(props) { 33 function RegisterPage(props) {
38 const dispatch = useDispatch(); 34 const dispatch = useDispatch();
39 return ( 35 return (
40 -
41 <Formik 36 <Formik
42 initialValues={{ 37 initialValues={{
43 - email: '', 38 + email: "",
44 - 39 + name: "",
45 - name: '', 40 + address: "",
46 - password: '', 41 + password: "",
47 - confirmPassword: '' 42 + confirmPassword: "",
48 }} 43 }}
49 validationSchema={Yup.object().shape({ 44 validationSchema={Yup.object().shape({
50 - name: Yup.string() 45 + name: Yup.string().required("이름을 입력해주세요."),
51 - .required('이름이 올바르게 입력되지 않았습니다.'), 46 + email: Yup.string().email("이메일 형식이 올바르지 않습니다.").required("이메일을 입력해주세요."),
52 - 47 + password: Yup.string().min(5, "비밀번호는 5자리 이상이어야 합니다.").required("비밀번호를 입력해주세요."),
53 - email: Yup.string()
54 - .required('이메일이 올바르게 입력되지 않았습니다.'),
55 - password: Yup.string()
56 - .min(3, '비밀번호는 3자리 이상이어야 합니다.')
57 - .required('비밀번호를 입력해주세요.'),
58 confirmPassword: Yup.string() 48 confirmPassword: Yup.string()
59 - .oneOf([Yup.ref('password'), null], '비밀번호를 다시 확인해주세요.') 49 + .oneOf([Yup.ref("password"), null], "비밀번호가 일치하지 않습니다.")
60 - .required('비밀번호 확인이 올바르게 입력되지 않았습니다.') 50 + .required("비밀번호를 한번 더 입력해주세요."),
51 + adress: Yup.string().required("주소를 입력해주세요."),
61 })} 52 })}
62 onSubmit={(values, { setSubmitting }) => { 53 onSubmit={(values, { setSubmitting }) => {
63 setTimeout(() => { 54 setTimeout(() => {
64 -
65 let dataToSubmit = { 55 let dataToSubmit = {
66 email: values.email, 56 email: values.email,
67 password: values.password, 57 password: values.password,
68 name: values.name, 58 name: values.name,
69 - 59 + adress: values.adress,
70 - //image: `http://gravatar.com/avatar/${moment().unix()}?d=identicon` 60 + image: `http://gravatar.com/avatar/${moment().unix()}?d=identicon`,
71 }; 61 };
72 62
73 dispatch(registerUser(dataToSubmit)).then(response => { 63 dispatch(registerUser(dataToSubmit)).then(response => {
74 if (response.payload.success) { 64 if (response.payload.success) {
75 props.history.push("/login"); 65 props.history.push("/login");
76 } else { 66 } else {
77 - alert(response.payload.err.errmsg) 67 + alert(response.payload.err.errmsg);
78 } 68 }
79 - }) 69 + });
80 70
81 setSubmitting(false); 71 setSubmitting(false);
82 }, 500); 72 }, 500);
83 }} 73 }}
84 > 74 >
85 {props => { 75 {props => {
86 - const { 76 + const { values, touched, errors, dirty, isSubmitting, handleChange, handleBlur, handleSubmit, handleReset } = props;
87 - values,
88 - touched,
89 - errors,
90 - dirty,
91 - isSubmitting,
92 - handleChange,
93 - handleBlur,
94 - handleSubmit,
95 - handleReset,
96 - } = props;
97 return ( 77 return (
98 <div className="app"> 78 <div className="app">
99 - <h2>회원가입</h2> 79 + <h3>회원가입</h3>
100 - <Form style={{ minWidth: '375px' }} {...formItemLayout} onSubmit={handleSubmit} > 80 + <Form style={{ minWidth: "375px" }} {...formItemLayout} onSubmit={handleSubmit}>
101 - 81 + <Form.Item required label="이름">
102 - <Form.Item required label="Name">
103 <Input 82 <Input
104 id="name" 83 id="name"
105 - placeholder="이름을 입력하세요." 84 + placeholder="이름을 입력하세요"
106 type="text" 85 type="text"
107 value={values.name} 86 value={values.name}
108 onChange={handleChange} 87 onChange={handleChange}
109 onBlur={handleBlur} 88 onBlur={handleBlur}
110 - className={ 89 + className={errors.name && touched.name ? "text-input error" : "text-input"}
111 - errors.name && touched.name ? 'text-input error' : 'text-input'
112 - }
113 /> 90 />
114 - {errors.name && touched.name && ( 91 + {errors.name && touched.name && <div className="input-feedback">{errors.name}</div>}
115 - <div className="input-feedback">{errors.name}</div> 92 + </Form.Item>
116 - )} 93 +
117 - </Form.Item> 94 +
118 95
119 - <Form.Item required label="Email" hasFeedback> 96 + <Form.Item required label="이메일">
120 <Input 97 <Input
121 id="email" 98 id="email"
122 - placeholder="이메일을 입력세요." 99 + placeholder="이메일을 입력해주세요."
123 type="email" 100 type="email"
124 value={values.email} 101 value={values.email}
125 onChange={handleChange} 102 onChange={handleChange}
126 onBlur={handleBlur} 103 onBlur={handleBlur}
127 - className={ 104 + className={errors.email && touched.email ? "text-input error" : "text-input"}
128 - errors.email && touched.email ? 'text-input error' : 'text-input'
129 - }
130 /> 105 />
131 - {errors.email && touched.email && ( 106 + {errors.email && touched.email && <div className="input-feedback">{errors.email}</div>}
132 - <div className="input-feedback">{errors.email}</div>
133 - )}
134 </Form.Item> 107 </Form.Item>
135 108
136 - <Form.Item required label="Password" hasFeedback> 109 + <Form.Item required label="비밀번호">
137 <Input 110 <Input
138 id="password" 111 id="password"
139 - placeholder="비밀번호를 입력세요." 112 + placeholder="비밀번호를 입력해주세요."
140 type="password" 113 type="password"
141 value={values.password} 114 value={values.password}
142 onChange={handleChange} 115 onChange={handleChange}
143 onBlur={handleBlur} 116 onBlur={handleBlur}
144 - className={ 117 + className={errors.password && touched.password ? "text-input error" : "text-input"}
145 - errors.password && touched.password ? 'text-input error' : 'text-input'
146 - }
147 /> 118 />
148 - {errors.password && touched.password && ( 119 + {errors.password && touched.password && <div className="input-feedback">{errors.password}</div>}
149 - <div className="input-feedback">{errors.password}</div>
150 - )}
151 </Form.Item> 120 </Form.Item>
152 121
153 - <Form.Item required label="Confirm" hasFeedback> 122 + <Form.Item required label="비밀번호 확인">
154 <Input 123 <Input
155 id="confirmPassword" 124 id="confirmPassword"
156 - placeholder="비밀번호를 다시 한 번 입력해주세요." 125 + placeholder="비밀번호를 한번 더 입력해주세요."
157 type="password" 126 type="password"
158 value={values.confirmPassword} 127 value={values.confirmPassword}
159 onChange={handleChange} 128 onChange={handleChange}
160 onBlur={handleBlur} 129 onBlur={handleBlur}
161 - className={ 130 + className={errors.confirmPassword && touched.confirmPassword ? "text-input error" : "text-input"}
162 - errors.confirmPassword && touched.confirmPassword ? 'text-input error' : 'text-input' 131 + />
163 - } 132 + {errors.confirmPassword && touched.confirmPassword && <div className="input-feedback">{errors.confirmPassword}</div>}
133 + </Form.Item>
134 +
135 + <Form.Item required label="주소">
136 + <TextArea
137 + id="adress"
138 + placeholder="주소를 입력하세요"
139 + type="text"
140 + value={values.adress}
141 + onChange={handleChange}
142 + onBlur={handleBlur}
143 + className={errors.adress && touched.adress ? "text-input error" : "text-input"}
164 /> 144 />
165 - {errors.confirmPassword && touched.confirmPassword && ( 145 + {errors.adress && touched.adress && <div className="input-feedback">{errors.adress}</div>}
166 - <div className="input-feedback">{errors.confirmPassword}</div>
167 - )}
168 </Form.Item> 146 </Form.Item>
169 147
170 <Form.Item {...tailFormItemLayout}> 148 <Form.Item {...tailFormItemLayout}>
171 <Button onClick={handleSubmit} type="primary" disabled={isSubmitting}> 149 <Button onClick={handleSubmit} type="primary" disabled={isSubmitting}>
172 - Submit 150 + 가입
173 </Button> 151 </Button>
174 </Form.Item> 152 </Form.Item>
175 </Form> 153 </Form>
...@@ -178,7 +156,6 @@ function RegisterPage(props) { ...@@ -178,7 +156,6 @@ function RegisterPage(props) {
178 }} 156 }}
179 </Formik> 157 </Formik>
180 ); 158 );
181 -}; 159 +}
182 -
183 160
184 -export default RegisterPage 161 +export default RegisterPage;
......
...@@ -2,16 +2,21 @@ import React from 'react'; ...@@ -2,16 +2,21 @@ import React from 'react';
2 import { useState } from 'react'; 2 import { useState } from 'react';
3 import { Typography, Button, Form, Input } from 'antd'; // css 3 import { Typography, Button, Form, Input } from 'antd'; // css
4 import ImageUpload from '../../utils/ImageUpload' 4 import ImageUpload from '../../utils/ImageUpload'
5 +import Axios from 'axios';
5 6
6 const { TextArea } = Input; // 박스크기 조절을 사용자가 임의로 가능하게 함. 7 const { TextArea } = Input; // 박스크기 조절을 사용자가 임의로 가능하게 함.
7 8
8 -// Select Options 9 +// Select symtoms
9 -const options = [{ key: 1, value: "a" }, 10 +const symtoms = [{ key: 1, value: "진통제" },
10 - { key: 2, value: "b" }, 11 + { key: 2, value: "소화제" },
11 - {key: 3, value : "c"} 12 + { key: 3, value: "감기약" },
13 + { key: 4, value: "해열제" },
14 + { key: 5, value: "파스류" },
15 + { key: 6, value: "상처치료" },
16 + { key: 7, value: "기타" }
12 ] 17 ]
13 18
14 -function UploadPage() { 19 +function UploadPage(props) {
15 20
16 // OnChange Function 21 // OnChange Function
17 22
...@@ -47,6 +52,35 @@ function UploadPage() { ...@@ -47,6 +52,35 @@ function UploadPage() {
47 setImage(newImages); 52 setImage(newImages);
48 } 53 }
49 54
55 + const submitEvent = (event) => {
56 + event.preventDefault(); // 확인버튼을 누를 때 리프레시 되지 않도록
57 +
58 + if (!Title || !Info || !Cost || !Option || !Image) {
59 + return alert("모두 입력해주세요.")
60 + }
61 +
62 + // 서버에 보낼 값들
63 + const body = {
64 + seller: props.user.userData._id,
65 + title: Title,
66 + info: Info,
67 + price: Cost,
68 + images: Image,
69 + symtoms: Option
70 + }
71 +
72 + Axios.post("/api/product", body)
73 + .then(response => {
74 + if (response.data.success) {
75 + alert("업로드가 완료되었습니다.");
76 + props.history.push('/'); // 상품 업로드가 성공하면 메인페이지로 돌아감.
77 + }
78 + else {
79 + alert("업로드에 실패했습니다.")
80 + }
81 + })
82 + }
83 +
50 84
51 return ( 85 return (
52 <div style={{ maxWidth: '700px', margin: '2rem auto' }}> 86 <div style={{ maxWidth: '700px', margin: '2rem auto' }}>
...@@ -56,7 +90,7 @@ function UploadPage() { ...@@ -56,7 +90,7 @@ function UploadPage() {
56 90
57 </div> 91 </div>
58 92
59 - <Form> 93 + <Form onSubmit={submitEvent}>
60 {/* 파일업로드 부분은 코드가 길어서 따로 컴포넌트로 만들어버리기~! */} 94 {/* 파일업로드 부분은 코드가 길어서 따로 컴포넌트로 만들어버리기~! */}
61 <ImageUpload refreshFunction={updateImages}/> 95 <ImageUpload refreshFunction={updateImages}/>
62 <br /> 96 <br />
...@@ -75,14 +109,14 @@ function UploadPage() { ...@@ -75,14 +109,14 @@ function UploadPage() {
75 <br /> 109 <br />
76 <br /> 110 <br />
77 <select onChange={optionEvent} value={ Option}> 111 <select onChange={optionEvent} value={ Option}>
78 - {options.map(item => ( 112 + {symtoms.map(item => (
79 <option key={item.key} value={item.key}>{ item.value}</option> 113 <option key={item.key} value={item.key}>{ item.value}</option>
80 ))} 114 ))}
81 <option></option> 115 <option></option>
82 </select> 116 </select>
83 <br /> 117 <br />
84 <br /> 118 <br />
85 - <Button>확인</Button> 119 + <Button onClick={submitEvent}>확인</Button>
86 120
87 </Form> 121 </Form>
88 122
...@@ -90,4 +124,4 @@ function UploadPage() { ...@@ -90,4 +124,4 @@ function UploadPage() {
90 ) 124 )
91 } 125 }
92 126
93 -export default UploadPage 127 + export default UploadPage;
......
1 +import React, { useState } from "react";
2 +import {Button, Form, message, Input, Icon } from "antd";
3 +import FileUpload from "../../utils/FileUpload";
4 +import Axios from "axios";
5 +
6 +const { TextArea } = Input;
7 +
8 +const Medicines = [
9 + { key: 1, value: "진통제" },
10 + { key: 2, value: "소화제" },
11 + { key: 3, value: "감기약" },
12 + { key: 4, value: "해열제" },
13 + { key: 5, value: "파스류" },
14 + { key: 6, value: "상처치료" },
15 + { key: 7, value: "기타" }
16 +];
17 +
18 +function UploadProductPage(props) {
19 + const [TitleValue, setTitleValue] = useState("");
20 + const [DescriptionValue, setDescriptionValue] = useState("");
21 + const [PriceValue, setPriceValue] = useState(0);
22 + const [MedicinesValue, setMedicinesValue] = useState(1);
23 +
24 + const [Images, setImages] = useState([]);
25 +
26 + const onTitleChange = event => {
27 + setTitleValue(event.currentTarget.value);
28 + };
29 +
30 + const onDescriptionChange = event => {
31 + setDescriptionValue(event.currentTarget.value);
32 + };
33 +
34 + const onPriceChange = event => {
35 + setPriceValue(event.currentTarget.value);
36 + };
37 +
38 + const onMedicinesSelectChange = event => {
39 + setMedicinesValue(event.currentTarget.value);
40 + };
41 +
42 + const updateImages = newImages => {
43 + setImages(newImages);
44 + };
45 + const onSubmit = event => {
46 + event.preventDefault();
47 +
48 + if (!TitleValue || !DescriptionValue || !PriceValue || !MedicinesValue || !Images) {
49 + return alert("fill all the fields first!");
50 + }
51 +
52 + const variables = {
53 + writer: props.user.userData._id,
54 + title: TitleValue,
55 + description: DescriptionValue,
56 + price: PriceValue,
57 + images: Images,
58 + medicines: MedicinesValue,
59 + };
60 +
61 + Axios.post("/api/product/uploadProduct", variables).then(response => {
62 + if (response.data.success) {
63 + alert("Product Successfully Uploaded");
64 + props.history.push("/");
65 + } else {
66 + alert("Failed to upload Product");
67 + }
68 + });
69 + };
70 +
71 + return (
72 + <div style={{ maxWidth: "700px", margin: "2rem auto" }}>
73 + <div style={{ textAlign: "center", marginBottom: "2rem" }}>
74 + <h3> 등록하기</h3>
75 + </div>
76 +
77 + <Form onSubmit={onSubmit}>
78 + {/* DropZone */}
79 + <FileUpload refreshFunction={updateImages} />
80 +
81 + <br />
82 + <br />
83 + <label> 이름</label>
84 + <Input onChange={onTitleChange} value={TitleValue} />
85 + <br />
86 + <br />
87 + <label>설명</label>
88 + <TextArea onChange={onDescriptionChange} value={DescriptionValue} />
89 + <br />
90 + <br />
91 + <label>가격($)</label>
92 + <Input onChange={onPriceChange} value={PriceValue} type="number" />
93 + <br />
94 + <br />
95 + <select onChange={onMedicinesSelectChange} value={MedicinesValue}>
96 + {Medicines.map(item => (
97 + <option key={item.key} value={item.key}>{item.value} </option>
98 + ))}
99 + </select>
100 + <br />
101 + <br />
102 + <Button onClick={onSubmit}>등록</Button>
103 + </Form>
104 + </div>
105 + );
106 +}
107 +
108 +export default UploadProductPage;
1 +import React, { Component } from 'react'
2 +import { Typography, Button, Form, Input } from 'antd';
3 +import axios from 'axios';
4 +import FileUpload from '../../utils/FileUpload';
5 +
6 +const { Title } = Typography;
7 +const { TextArea } = Input;
8 +
9 +const Medicines = [
10 + { key: 1, value: "진통제" },
11 + { key: 2, value: "소화제" },
12 + { key: 3, value: "감기약" },
13 + { key: 4, value: "해열제" },
14 + { key: 5, value: "파스류" },
15 + { key: 6, value: "상처치료" },
16 + { key: 7, value: "기타" }
17 +]
18 +
19 +export class UploadProductPage extends Component {
20 +
21 + state = {
22 + title: '',
23 + description: '',
24 + medicines: 1,
25 + images: [],
26 + price: 0
27 + }
28 +
29 + handleChangeTitle = (event) => {
30 + this.setState({ title: event.currentTarget.value })
31 + }
32 +
33 + handleChangePrice = (event) => {
34 + this.setState({ price: parseInt(event.currentTarget.value, 10) })
35 + }
36 +
37 + handleChangeDecsription = (event) => {
38 + // console.log(event.currentTarget.value)
39 + this.setState({ description: event.currentTarget.value })
40 + }
41 +
42 + handleChangeMedicines = (event) => {
43 + this.setState({ medicines: event.currentTarget.value })
44 + }
45 +
46 + onSubmit = (event) => {
47 + event.preventDefault();
48 +
49 + if (this.props.user.userData && !this.props.user.userData.isAuth) {
50 + return alert('!! 접근할 수 없습니다 !!')
51 + }
52 +
53 + if (!this.state.title || !this.state.description ||
54 + !this.state.medicines || !this.state.images
55 + || !this.state.price) {
56 + return alert('모든 항목을 채워주세요.')
57 + }
58 +
59 + const variables = {
60 + writer: this.props.user.userData._id,
61 + title: this.state.title,
62 + description: this.state.description,
63 + images: this.state.images,
64 + medicines: this.state.medicines,
65 + price: this.state.price
66 + }
67 +
68 + axios.post('/api/product/uploadProduct', variables)
69 + .then(response => {
70 + if (response.data.success) {
71 + alert('성공적으로 업로드 했습니다.')
72 + setTimeout(() => {
73 + this.props.history.push('/')
74 + }, 1000);
75 + } else {
76 + alert('업로드에 실패했습니다.')
77 + }
78 + })
79 + }
80 +
81 + updateFiles = (newImages) => {
82 + this.setState({ images: newImages })
83 + }
84 +
85 +
86 + render() {
87 + return (
88 + <div style={{ maxWidth: '700px', margin: '2rem auto' }}>
89 + <div style={{ textAlign: 'center', marginBottom: '2rem' }}>
90 + <Title level={2} > 배달 서비스 : 약사</Title>
91 + </div>
92 +
93 + <Form onSubmit={this.onSubmit}>
94 +
95 + <FileUpload refreshFunction={this.updateFiles} />
96 +
97 + <br /><br />
98 + <label>제품명</label>
99 + <Input
100 + onChange={this.handleChangeTitle}
101 + value={this.state.title}
102 + />
103 + <br /><br />
104 + <label>설명</label>
105 + <TextArea
106 + onChange={this.handleChangeDecsription}
107 + value={this.state.description}
108 + />
109 + <br /><br />
110 + <label>가격</label>
111 + <Input
112 + type="number"
113 + onChange={this.handleChangePrice}
114 + value={this.state.price}
115 + />
116 + <br /><br />
117 + <select onChange={this.handleChangeMedicines}>
118 + {Medicines.map(item => (
119 + <option key={item.key} value={item.key}>{item.value}</option>
120 + ))}
121 + </select>
122 + <br /><br />
123 +
124 +
125 + <Button type="primary" size="large" onClick={this.onSubmit}>
126 + Submit
127 + </Button>
128 + </Form>
129 + </div>
130 + )
131 + }
132 +}
133 +
134 +export default UploadProductPage
1 +import React from "react";
2 +import axios from 'axios';
3 +
4 +function adminPage(props) {
5 +
6 +}
7 +
8 +export default adminPage;
1 -/* eslint-disable react-hooks/exhaustive-deps */
2 import React, { useEffect } from 'react'; 1 import React, { useEffect } from 'react';
3 import { auth } from '../_actions/user_actions'; 2 import { auth } from '../_actions/user_actions';
4 import { useSelector, useDispatch } from "react-redux"; 3 import { useSelector, useDispatch } from "react-redux";
5 4
6 -export default function (SpecificComponent, option, adminRoute = null) { 5 +export default function (ComposedClass, reload, adminRoute = null) {
7 function AuthenticationCheck(props) { 6 function AuthenticationCheck(props) {
8 7
9 let user = useSelector(state => state.user); 8 let user = useSelector(state => state.user);
10 const dispatch = useDispatch(); 9 const dispatch = useDispatch();
11 10
12 useEffect(() => { 11 useEffect(() => {
13 - //To know my current status, send Auth request 12 +
14 - dispatch(auth()).then(response => { 13 + dispatch(auth()).then(async response => {
15 - //Not Loggined in Status 14 + if (await !response.payload.isAuth) {
16 - if (!response.payload.isAuth) { 15 + if (reload) {
17 - if (option) {
18 props.history.push('/login') 16 props.history.push('/login')
19 } 17 }
20 - //Loggined in Status
21 } else { 18 } else {
22 - //supposed to be Admin page, but not admin person wants to go inside
23 if (adminRoute && !response.payload.isAdmin) { 19 if (adminRoute && !response.payload.isAdmin) {
24 props.history.push('/') 20 props.history.push('/')
25 } 21 }
26 - //Logged in Status, but Try to go into log in page
27 else { 22 else {
28 - if (option === false) { 23 + if (reload === false) {
29 props.history.push('/') 24 props.history.push('/')
30 } 25 }
31 } 26 }
32 } 27 }
33 }) 28 })
34 - 29 +
35 - }, []) 30 + }, [dispatch, props.history, user.googleAuth])
36 31
37 return ( 32 return (
38 - <SpecificComponent {...props} user={user} /> 33 + <ComposedClass {...props} user={user} />
39 ) 34 )
40 } 35 }
41 return AuthenticationCheck 36 return AuthenticationCheck
......
1 +@import "~react-image-gallery/styles/css/image-gallery.css";
2 +@font-face {
3 + font-family: "BRBA_B";
4 + src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_seven@1.2/BRBA_B.woff")
5 + format("woff");
6 + font-weight: normal;
7 + font-style: normal;
8 +}
9 +
10 +@font-face {
11 + font-family: "InfinitySans-RegularA1";
12 + src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/InfinitySans-RegularA1.woff")
13 + format("woff");
14 + font-weight: normal;
15 + font-style: normal;
16 +}
17 +
18 +@font-face {
19 + font-family: "GongGothicMedium";
20 + src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-10@1.0/GongGothicMedium.woff")
21 + format("woff");
22 + font-weight: normal;
23 + font-style: normal;
24 +}
25 +
1 body { 26 body {
2 margin: 0; 27 margin: 0;
3 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 28 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
...@@ -38,3 +63,28 @@ input.error { ...@@ -38,3 +63,28 @@ input.error {
38 height: 5px; 63 height: 5px;
39 margin-top: -12px; 64 margin-top: -12px;
40 } 65 }
66 +
67 +table {
68 + font-family: arial, sans-serif;
69 + border-collapse: collapse;
70 + width: 100%;
71 +}
72 +
73 +td,
74 +th {
75 + border: 1px solid #dddddd;
76 + text-align: left;
77 + padding: 8px;
78 +}
79 +
80 +tr:nth-child(even) {
81 + background-color: #dddddd;
82 +}
83 +
84 +h1 {
85 + font-family: "GongGothicMedium";
86 +}
87 +
88 +h3 {
89 + font-family: "InfinitySans-RegularA1";
90 +}
......
1 -import 'react-app-polyfill/ie9'; 1 +import React from "react";
2 -import 'react-app-polyfill/ie11'; 2 +import ReactDOM from "react-dom";
3 -import 'core-js'; 3 +import "./index.css";
4 - 4 +import App from "./components/App";
5 -import React from 'react'; 5 +import * as serviceWorker from "./serviceWorker";
6 -import ReactDOM from 'react-dom';
7 -import './index.css';
8 -import App from './components/App';
9 -import * as serviceWorker from './serviceWorker';
10 import { BrowserRouter } from "react-router-dom"; 6 import { BrowserRouter } from "react-router-dom";
11 7
12 -import Reducer from './_reducers'; 8 +import Reducer from "./_reducers";
13 -import { Provider } from 'react-redux'; 9 +import { Provider } from "react-redux";
14 -import { createStore, applyMiddleware } from 'redux'; 10 +import { createStore, applyMiddleware } from "redux";
15 -import promiseMiddleware from 'redux-promise'; 11 +import promiseMiddleware from "redux-promise";
16 -import ReduxThunk from 'redux-thunk'; 12 +import ReduxThunk from "redux-thunk";
17 13
18 const createStoreWithMiddleware = applyMiddleware(promiseMiddleware, ReduxThunk)(createStore); 14 const createStoreWithMiddleware = applyMiddleware(promiseMiddleware, ReduxThunk)(createStore);
19 15
20 ReactDOM.render( 16 ReactDOM.render(
21 - <Provider 17 + <Provider store={createStoreWithMiddleware(Reducer, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__())}>
22 - store={createStoreWithMiddleware( 18 + <BrowserRouter>
23 - Reducer, 19 + <App />
24 - window.__REDUX_DEVTOOLS_EXTENSION__ && 20 + </BrowserRouter>
25 - window.__REDUX_DEVTOOLS_EXTENSION__() 21 + </Provider>,
26 - )} 22 + document.getElementById("root")
27 - > 23 +);
28 - <BrowserRouter>
29 - <App />
30 - </BrowserRouter>
31 - </Provider>
32 - , document.getElementById('root'));
33 // If you want your app to work offline and load faster, you can change 24 // If you want your app to work offline and load faster, you can change
34 // unregister() to register() below. Note this comes with some pitfalls. 25 // unregister() to register() below. Note this comes with some pitfalls.
35 // Learn more about service workers: https://bit.ly/CRA-PWA 26 // Learn more about service workers: https://bit.ly/CRA-PWA
......
This diff could not be displayed because it is too large.
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
5 "requires": true, 5 "requires": true,
6 "dependencies": { 6 "dependencies": {
7 "@babel/runtime": { 7 "@babel/runtime": {
8 - "version": "7.9.2", 8 + "version": "7.6.0",
9 - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", 9 + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.0.tgz",
10 - "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==", 10 + "integrity": "sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ==",
11 "requires": { 11 "requires": {
12 - "regenerator-runtime": "^0.13.4" 12 + "regenerator-runtime": "^0.13.2"
13 } 13 }
14 }, 14 },
15 "abbrev": { 15 "abbrev": {
...@@ -26,6 +26,11 @@ ...@@ -26,6 +26,11 @@
26 "negotiator": "0.6.2" 26 "negotiator": "0.6.2"
27 } 27 }
28 }, 28 },
29 + "after": {
30 + "version": "0.8.2",
31 + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz",
32 + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8="
33 + },
29 "ansi-align": { 34 "ansi-align": {
30 "version": "2.0.0", 35 "version": "2.0.0",
31 "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", 36 "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz",
...@@ -151,24 +156,44 @@ ...@@ -151,24 +156,44 @@
151 "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", 156 "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
152 "dev": true 157 "dev": true
153 }, 158 },
159 + "arraybuffer.slice": {
160 + "version": "0.0.7",
161 + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
162 + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog=="
163 + },
154 "assign-symbols": { 164 "assign-symbols": {
155 "version": "1.0.0", 165 "version": "1.0.0",
156 "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", 166 "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
157 "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", 167 "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
158 "dev": true 168 "dev": true
159 }, 169 },
170 + "async": {
171 + "version": "3.1.0",
172 + "resolved": "https://registry.npmjs.org/async/-/async-3.1.0.tgz",
173 + "integrity": "sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ=="
174 + },
160 "async-each": { 175 "async-each": {
161 "version": "1.0.3", 176 "version": "1.0.3",
162 "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", 177 "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
163 "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", 178 "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
164 "dev": true 179 "dev": true
165 }, 180 },
181 + "async-limiter": {
182 + "version": "1.0.1",
183 + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
184 + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
185 + },
166 "atob": { 186 "atob": {
167 "version": "2.1.2", 187 "version": "2.1.2",
168 "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", 188 "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
169 "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", 189 "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
170 "dev": true 190 "dev": true
171 }, 191 },
192 + "backo2": {
193 + "version": "1.0.2",
194 + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
195 + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc="
196 + },
172 "balanced-match": { 197 "balanced-match": {
173 "version": "1.0.0", 198 "version": "1.0.0",
174 "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 199 "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
...@@ -229,13 +254,31 @@ ...@@ -229,13 +254,31 @@
229 } 254 }
230 } 255 }
231 }, 256 },
257 + "base64-arraybuffer": {
258 + "version": "0.1.5",
259 + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz",
260 + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg="
261 + },
262 + "base64id": {
263 + "version": "1.0.0",
264 + "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz",
265 + "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY="
266 + },
232 "bcrypt": { 267 "bcrypt": {
233 - "version": "3.0.8", 268 + "version": "3.0.6",
234 - "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-3.0.8.tgz", 269 + "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-3.0.6.tgz",
235 - "integrity": "sha512-jKV6RvLhI36TQnPDvUFqBEnGX9c8dRRygKxCZu7E+MgLfKZbmmXL8a7/SFFOyHoPNX9nV81cKRC5tbQfvEQtpw==", 270 + "integrity": "sha512-taA5bCTfXe7FUjKroKky9EXpdhkVvhE5owfxfLYodbrAR1Ul3juLmIQmIQBK4L9a5BuUcE6cqmwT+Da20lF9tg==",
236 "requires": { 271 "requires": {
237 - "nan": "2.14.0", 272 + "nan": "2.13.2",
238 - "node-pre-gyp": "0.14.0" 273 + "node-pre-gyp": "0.12.0"
274 + }
275 + },
276 + "better-assert": {
277 + "version": "1.0.2",
278 + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz",
279 + "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=",
280 + "requires": {
281 + "callsite": "1.0.0"
239 } 282 }
240 }, 283 },
241 "binary-extensions": { 284 "binary-extensions": {
...@@ -244,24 +287,10 @@ ...@@ -244,24 +287,10 @@
244 "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", 287 "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
245 "dev": true 288 "dev": true
246 }, 289 },
247 - "bindings": { 290 + "blob": {
248 - "version": "1.5.0", 291 + "version": "0.0.5",
249 - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 292 + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
250 - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 293 + "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig=="
251 - "dev": true,
252 - "optional": true,
253 - "requires": {
254 - "file-uri-to-path": "1.0.0"
255 - }
256 - },
257 - "bl": {
258 - "version": "2.2.0",
259 - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz",
260 - "integrity": "sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA==",
261 - "requires": {
262 - "readable-stream": "^2.3.5",
263 - "safe-buffer": "^5.1.1"
264 - }
265 }, 294 },
266 "bluebird": { 295 "bluebird": {
267 "version": "3.5.1", 296 "version": "3.5.1",
...@@ -393,9 +422,9 @@ ...@@ -393,9 +422,9 @@
393 } 422 }
394 }, 423 },
395 "bson": { 424 "bson": {
396 - "version": "1.1.4", 425 + "version": "1.1.1",
397 - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.4.tgz", 426 + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.1.tgz",
398 - "integrity": "sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q==" 427 + "integrity": "sha512-jCGVYLoYMHDkOsbwJZBCqwMHyH4c+wzgI9hG7Z6SZJRXWr+x58pdIbm2i9a/jFGCkRJqRUr8eoI7lDWa0hTkxg=="
399 }, 428 },
400 "buffer-equal-constant-time": { 429 "buffer-equal-constant-time": {
401 "version": "1.0.1", 430 "version": "1.0.1",
...@@ -461,6 +490,11 @@ ...@@ -461,6 +490,11 @@
461 "unset-value": "^1.0.0" 490 "unset-value": "^1.0.0"
462 } 491 }
463 }, 492 },
493 + "callsite": {
494 + "version": "1.0.0",
495 + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
496 + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA="
497 + },
464 "camelcase": { 498 "camelcase": {
465 "version": "5.3.1", 499 "version": "5.3.1",
466 "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", 500 "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
...@@ -484,12 +518,6 @@ ...@@ -484,12 +518,6 @@
484 "supports-color": "^5.3.0" 518 "supports-color": "^5.3.0"
485 }, 519 },
486 "dependencies": { 520 "dependencies": {
487 - "has-flag": {
488 - "version": "3.0.0",
489 - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
490 - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
491 - "dev": true
492 - },
493 "supports-color": { 521 "supports-color": {
494 "version": "5.5.0", 522 "version": "5.5.0",
495 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 523 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
...@@ -522,9 +550,9 @@ ...@@ -522,9 +550,9 @@
522 } 550 }
523 }, 551 },
524 "chownr": { 552 "chownr": {
525 - "version": "1.1.4", 553 + "version": "1.1.2",
526 - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", 554 + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.2.tgz",
527 - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" 555 + "integrity": "sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A=="
528 }, 556 },
529 "ci-info": { 557 "ci-info": {
530 "version": "1.6.0", 558 "version": "1.6.0",
...@@ -635,11 +663,20 @@ ...@@ -635,11 +663,20 @@
635 "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 663 "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
636 "dev": true 664 "dev": true
637 }, 665 },
666 + "component-bind": {
667 + "version": "1.0.0",
668 + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
669 + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E="
670 + },
638 "component-emitter": { 671 "component-emitter": {
639 - "version": "1.3.0", 672 + "version": "1.2.1",
640 - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", 673 + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
641 - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", 674 + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
642 - "dev": true 675 + },
676 + "component-inherit": {
677 + "version": "0.0.3",
678 + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
679 + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM="
643 }, 680 },
644 "concat-map": { 681 "concat-map": {
645 "version": "0.0.1", 682 "version": "0.0.1",
...@@ -672,23 +709,6 @@ ...@@ -672,23 +709,6 @@
672 "supports-color": "^4.5.0", 709 "supports-color": "^4.5.0",
673 "tree-kill": "^1.2.1", 710 "tree-kill": "^1.2.1",
674 "yargs": "^12.0.5" 711 "yargs": "^12.0.5"
675 - },
676 - "dependencies": {
677 - "has-flag": {
678 - "version": "2.0.0",
679 - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
680 - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
681 - "dev": true
682 - },
683 - "supports-color": {
684 - "version": "4.5.0",
685 - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
686 - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
687 - "dev": true,
688 - "requires": {
689 - "has-flag": "^2.0.0"
690 - }
691 - }
692 } 712 }
693 }, 713 },
694 "configstore": { 714 "configstore": {
...@@ -724,16 +744,16 @@ ...@@ -724,16 +744,16 @@
724 "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 744 "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
725 }, 745 },
726 "cookie": { 746 "cookie": {
727 - "version": "0.4.0", 747 + "version": "0.3.1",
728 - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 748 + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
729 - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 749 + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
730 }, 750 },
731 "cookie-parser": { 751 "cookie-parser": {
732 - "version": "1.4.5", 752 + "version": "1.4.4",
733 - "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.5.tgz", 753 + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.4.tgz",
734 - "integrity": "sha512-f13bPUj/gG/5mDr+xLmSxxDsB9DQiTIfhJS/sqjrmfAWiAN+x2O4i/XguTL9yDZ+/IFDanJ+5x7hC4CXT9Tdzw==", 754 + "integrity": "sha512-lo13tqF3JEtFO7FyA49CqbhaFkskRJ0u/UAiINgrIXeRCY41c88/zxtrECl8AKH3B0hj9q10+h3Kt8I7KlW4tw==",
735 "requires": { 755 "requires": {
736 - "cookie": "0.4.0", 756 + "cookie": "0.3.1",
737 "cookie-signature": "1.0.6" 757 "cookie-signature": "1.0.6"
738 } 758 }
739 }, 759 },
...@@ -797,9 +817,9 @@ ...@@ -797,9 +817,9 @@
797 "dev": true 817 "dev": true
798 }, 818 },
799 "debug": { 819 "debug": {
800 - "version": "4.1.1", 820 + "version": "3.2.6",
801 - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 821 + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
802 - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 822 + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
803 "requires": { 823 "requires": {
804 "ms": "^2.1.1" 824 "ms": "^2.1.1"
805 } 825 }
...@@ -867,11 +887,6 @@ ...@@ -867,11 +887,6 @@
867 "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", 887 "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
868 "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" 888 "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
869 }, 889 },
870 - "denque": {
871 - "version": "1.4.1",
872 - "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz",
873 - "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ=="
874 - },
875 "depd": { 890 "depd": {
876 "version": "1.1.2", 891 "version": "1.1.2",
877 "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 892 "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
...@@ -953,14 +968,87 @@ ...@@ -953,14 +968,87 @@
953 "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 968 "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
954 }, 969 },
955 "end-of-stream": { 970 "end-of-stream": {
956 - "version": "1.4.4", 971 + "version": "1.4.1",
957 - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 972 + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
958 - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 973 + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
959 "dev": true, 974 "dev": true,
960 "requires": { 975 "requires": {
961 "once": "^1.4.0" 976 "once": "^1.4.0"
962 } 977 }
963 }, 978 },
979 + "engine.io": {
980 + "version": "3.3.2",
981 + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.3.2.tgz",
982 + "integrity": "sha512-AsaA9KG7cWPXWHp5FvHdDWY3AMWeZ8x+2pUVLcn71qE5AtAzgGbxuclOytygskw8XGmiQafTmnI9Bix3uihu2w==",
983 + "requires": {
984 + "accepts": "~1.3.4",
985 + "base64id": "1.0.0",
986 + "cookie": "0.3.1",
987 + "debug": "~3.1.0",
988 + "engine.io-parser": "~2.1.0",
989 + "ws": "~6.1.0"
990 + },
991 + "dependencies": {
992 + "debug": {
993 + "version": "3.1.0",
994 + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
995 + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
996 + "requires": {
997 + "ms": "2.0.0"
998 + }
999 + },
1000 + "ms": {
1001 + "version": "2.0.0",
1002 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1003 + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
1004 + }
1005 + }
1006 + },
1007 + "engine.io-client": {
1008 + "version": "3.3.2",
1009 + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.3.2.tgz",
1010 + "integrity": "sha512-y0CPINnhMvPuwtqXfsGuWE8BB66+B6wTtCofQDRecMQPYX3MYUZXFNKDhdrSe3EVjgOu4V3rxdeqN/Tr91IgbQ==",
1011 + "requires": {
1012 + "component-emitter": "1.2.1",
1013 + "component-inherit": "0.0.3",
1014 + "debug": "~3.1.0",
1015 + "engine.io-parser": "~2.1.1",
1016 + "has-cors": "1.1.0",
1017 + "indexof": "0.0.1",
1018 + "parseqs": "0.0.5",
1019 + "parseuri": "0.0.5",
1020 + "ws": "~6.1.0",
1021 + "xmlhttprequest-ssl": "~1.5.4",
1022 + "yeast": "0.1.2"
1023 + },
1024 + "dependencies": {
1025 + "debug": {
1026 + "version": "3.1.0",
1027 + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
1028 + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
1029 + "requires": {
1030 + "ms": "2.0.0"
1031 + }
1032 + },
1033 + "ms": {
1034 + "version": "2.0.0",
1035 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1036 + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
1037 + }
1038 + }
1039 + },
1040 + "engine.io-parser": {
1041 + "version": "2.1.3",
1042 + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz",
1043 + "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==",
1044 + "requires": {
1045 + "after": "0.8.2",
1046 + "arraybuffer.slice": "~0.0.7",
1047 + "base64-arraybuffer": "0.1.5",
1048 + "blob": "0.0.5",
1049 + "has-binary2": "~1.0.2"
1050 + }
1051 + },
964 "error-ex": { 1052 "error-ex": {
965 "version": "1.3.2", 1053 "version": "1.3.2",
966 "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", 1054 "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
...@@ -1088,6 +1176,11 @@ ...@@ -1088,6 +1176,11 @@
1088 "vary": "~1.1.2" 1176 "vary": "~1.1.2"
1089 }, 1177 },
1090 "dependencies": { 1178 "dependencies": {
1179 + "cookie": {
1180 + "version": "0.4.0",
1181 + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
1182 + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
1183 + },
1091 "debug": { 1184 "debug": {
1092 "version": "2.6.9", 1185 "version": "2.6.9",
1093 "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 1186 "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
...@@ -1189,13 +1282,6 @@ ...@@ -1189,13 +1282,6 @@
1189 } 1282 }
1190 } 1283 }
1191 }, 1284 },
1192 - "file-uri-to-path": {
1193 - "version": "1.0.0",
1194 - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
1195 - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
1196 - "dev": true,
1197 - "optional": true
1198 - },
1199 "fill-range": { 1285 "fill-range": {
1200 "version": "4.0.0", 1286 "version": "4.0.0",
1201 "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", 1287 "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
...@@ -1283,11 +1369,11 @@ ...@@ -1283,11 +1369,11 @@
1283 "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 1369 "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
1284 }, 1370 },
1285 "fs-minipass": { 1371 "fs-minipass": {
1286 - "version": "1.2.7", 1372 + "version": "1.2.6",
1287 - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", 1373 + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.6.tgz",
1288 - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", 1374 + "integrity": "sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ==",
1289 "requires": { 1375 "requires": {
1290 - "minipass": "^2.6.0" 1376 + "minipass": "^2.2.1"
1291 } 1377 }
1292 }, 1378 },
1293 "fs.realpath": { 1379 "fs.realpath": {
...@@ -1296,38 +1382,41 @@ ...@@ -1296,38 +1382,41 @@
1296 "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 1382 "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
1297 }, 1383 },
1298 "fsevents": { 1384 "fsevents": {
1299 - "version": "1.2.12", 1385 + "version": "1.2.9",
1300 - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz", 1386 + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz",
1301 - "integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==", 1387 + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==",
1302 "dev": true, 1388 "dev": true,
1303 "optional": true, 1389 "optional": true,
1304 "requires": { 1390 "requires": {
1305 - "bindings": "^1.5.0",
1306 "nan": "^2.12.1", 1391 "nan": "^2.12.1",
1307 - "node-pre-gyp": "*" 1392 + "node-pre-gyp": "^0.12.0"
1308 }, 1393 },
1309 "dependencies": { 1394 "dependencies": {
1310 "abbrev": { 1395 "abbrev": {
1311 "version": "1.1.1", 1396 "version": "1.1.1",
1312 - "bundled": true, 1397 + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
1398 + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
1313 "dev": true, 1399 "dev": true,
1314 "optional": true 1400 "optional": true
1315 }, 1401 },
1316 "ansi-regex": { 1402 "ansi-regex": {
1317 "version": "2.1.1", 1403 "version": "2.1.1",
1318 - "bundled": true, 1404 + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
1405 + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
1319 "dev": true, 1406 "dev": true,
1320 "optional": true 1407 "optional": true
1321 }, 1408 },
1322 "aproba": { 1409 "aproba": {
1323 "version": "1.2.0", 1410 "version": "1.2.0",
1324 - "bundled": true, 1411 + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
1412 + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
1325 "dev": true, 1413 "dev": true,
1326 "optional": true 1414 "optional": true
1327 }, 1415 },
1328 "are-we-there-yet": { 1416 "are-we-there-yet": {
1329 "version": "1.1.5", 1417 "version": "1.1.5",
1330 - "bundled": true, 1418 + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
1419 + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
1331 "dev": true, 1420 "dev": true,
1332 "optional": true, 1421 "optional": true,
1333 "requires": { 1422 "requires": {
...@@ -1337,13 +1426,15 @@ ...@@ -1337,13 +1426,15 @@
1337 }, 1426 },
1338 "balanced-match": { 1427 "balanced-match": {
1339 "version": "1.0.0", 1428 "version": "1.0.0",
1340 - "bundled": true, 1429 + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
1430 + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
1341 "dev": true, 1431 "dev": true,
1342 "optional": true 1432 "optional": true
1343 }, 1433 },
1344 "brace-expansion": { 1434 "brace-expansion": {
1345 "version": "1.1.11", 1435 "version": "1.1.11",
1346 - "bundled": true, 1436 + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
1437 + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
1347 "dev": true, 1438 "dev": true,
1348 "optional": true, 1439 "optional": true,
1349 "requires": { 1440 "requires": {
...@@ -1352,38 +1443,44 @@ ...@@ -1352,38 +1443,44 @@
1352 } 1443 }
1353 }, 1444 },
1354 "chownr": { 1445 "chownr": {
1355 - "version": "1.1.4", 1446 + "version": "1.1.1",
1356 - "bundled": true, 1447 + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
1448 + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==",
1357 "dev": true, 1449 "dev": true,
1358 "optional": true 1450 "optional": true
1359 }, 1451 },
1360 "code-point-at": { 1452 "code-point-at": {
1361 "version": "1.1.0", 1453 "version": "1.1.0",
1362 - "bundled": true, 1454 + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
1455 + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
1363 "dev": true, 1456 "dev": true,
1364 "optional": true 1457 "optional": true
1365 }, 1458 },
1366 "concat-map": { 1459 "concat-map": {
1367 "version": "0.0.1", 1460 "version": "0.0.1",
1368 - "bundled": true, 1461 + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
1462 + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
1369 "dev": true, 1463 "dev": true,
1370 "optional": true 1464 "optional": true
1371 }, 1465 },
1372 "console-control-strings": { 1466 "console-control-strings": {
1373 "version": "1.1.0", 1467 "version": "1.1.0",
1374 - "bundled": true, 1468 + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
1469 + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
1375 "dev": true, 1470 "dev": true,
1376 "optional": true 1471 "optional": true
1377 }, 1472 },
1378 "core-util-is": { 1473 "core-util-is": {
1379 "version": "1.0.2", 1474 "version": "1.0.2",
1380 - "bundled": true, 1475 + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
1476 + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
1381 "dev": true, 1477 "dev": true,
1382 "optional": true 1478 "optional": true
1383 }, 1479 },
1384 "debug": { 1480 "debug": {
1385 - "version": "3.2.6", 1481 + "version": "4.1.1",
1386 - "bundled": true, 1482 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
1483 + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
1387 "dev": true, 1484 "dev": true,
1388 "optional": true, 1485 "optional": true,
1389 "requires": { 1486 "requires": {
...@@ -1392,40 +1489,46 @@ ...@@ -1392,40 +1489,46 @@
1392 }, 1489 },
1393 "deep-extend": { 1490 "deep-extend": {
1394 "version": "0.6.0", 1491 "version": "0.6.0",
1395 - "bundled": true, 1492 + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
1493 + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
1396 "dev": true, 1494 "dev": true,
1397 "optional": true 1495 "optional": true
1398 }, 1496 },
1399 "delegates": { 1497 "delegates": {
1400 "version": "1.0.0", 1498 "version": "1.0.0",
1401 - "bundled": true, 1499 + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
1500 + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
1402 "dev": true, 1501 "dev": true,
1403 "optional": true 1502 "optional": true
1404 }, 1503 },
1405 "detect-libc": { 1504 "detect-libc": {
1406 "version": "1.0.3", 1505 "version": "1.0.3",
1407 - "bundled": true, 1506 + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
1507 + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
1408 "dev": true, 1508 "dev": true,
1409 "optional": true 1509 "optional": true
1410 }, 1510 },
1411 "fs-minipass": { 1511 "fs-minipass": {
1412 - "version": "1.2.7", 1512 + "version": "1.2.5",
1413 - "bundled": true, 1513 + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
1514 + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
1414 "dev": true, 1515 "dev": true,
1415 "optional": true, 1516 "optional": true,
1416 "requires": { 1517 "requires": {
1417 - "minipass": "^2.6.0" 1518 + "minipass": "^2.2.1"
1418 } 1519 }
1419 }, 1520 },
1420 "fs.realpath": { 1521 "fs.realpath": {
1421 "version": "1.0.0", 1522 "version": "1.0.0",
1422 - "bundled": true, 1523 + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
1524 + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
1423 "dev": true, 1525 "dev": true,
1424 "optional": true 1526 "optional": true
1425 }, 1527 },
1426 "gauge": { 1528 "gauge": {
1427 "version": "2.7.4", 1529 "version": "2.7.4",
1428 - "bundled": true, 1530 + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
1531 + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
1429 "dev": true, 1532 "dev": true,
1430 "optional": true, 1533 "optional": true,
1431 "requires": { 1534 "requires": {
...@@ -1440,8 +1543,9 @@ ...@@ -1440,8 +1543,9 @@
1440 } 1543 }
1441 }, 1544 },
1442 "glob": { 1545 "glob": {
1443 - "version": "7.1.6", 1546 + "version": "7.1.3",
1444 - "bundled": true, 1547 + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
1548 + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
1445 "dev": true, 1549 "dev": true,
1446 "optional": true, 1550 "optional": true,
1447 "requires": { 1551 "requires": {
...@@ -1455,13 +1559,15 @@ ...@@ -1455,13 +1559,15 @@
1455 }, 1559 },
1456 "has-unicode": { 1560 "has-unicode": {
1457 "version": "2.0.1", 1561 "version": "2.0.1",
1458 - "bundled": true, 1562 + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
1563 + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
1459 "dev": true, 1564 "dev": true,
1460 "optional": true 1565 "optional": true
1461 }, 1566 },
1462 "iconv-lite": { 1567 "iconv-lite": {
1463 "version": "0.4.24", 1568 "version": "0.4.24",
1464 - "bundled": true, 1569 + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
1570 + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
1465 "dev": true, 1571 "dev": true,
1466 "optional": true, 1572 "optional": true,
1467 "requires": { 1573 "requires": {
...@@ -1469,8 +1575,9 @@ ...@@ -1469,8 +1575,9 @@
1469 } 1575 }
1470 }, 1576 },
1471 "ignore-walk": { 1577 "ignore-walk": {
1472 - "version": "3.0.3", 1578 + "version": "3.0.1",
1473 - "bundled": true, 1579 + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz",
1580 + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
1474 "dev": true, 1581 "dev": true,
1475 "optional": true, 1582 "optional": true,
1476 "requires": { 1583 "requires": {
...@@ -1479,7 +1586,8 @@ ...@@ -1479,7 +1586,8 @@
1479 }, 1586 },
1480 "inflight": { 1587 "inflight": {
1481 "version": "1.0.6", 1588 "version": "1.0.6",
1482 - "bundled": true, 1589 + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
1590 + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
1483 "dev": true, 1591 "dev": true,
1484 "optional": true, 1592 "optional": true,
1485 "requires": { 1593 "requires": {
...@@ -1488,20 +1596,23 @@ ...@@ -1488,20 +1596,23 @@
1488 } 1596 }
1489 }, 1597 },
1490 "inherits": { 1598 "inherits": {
1491 - "version": "2.0.4", 1599 + "version": "2.0.3",
1492 - "bundled": true, 1600 + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
1601 + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
1493 "dev": true, 1602 "dev": true,
1494 "optional": true 1603 "optional": true
1495 }, 1604 },
1496 "ini": { 1605 "ini": {
1497 "version": "1.3.5", 1606 "version": "1.3.5",
1498 - "bundled": true, 1607 + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
1608 + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
1499 "dev": true, 1609 "dev": true,
1500 "optional": true 1610 "optional": true
1501 }, 1611 },
1502 "is-fullwidth-code-point": { 1612 "is-fullwidth-code-point": {
1503 "version": "1.0.0", 1613 "version": "1.0.0",
1504 - "bundled": true, 1614 + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
1615 + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
1505 "dev": true, 1616 "dev": true,
1506 "optional": true, 1617 "optional": true,
1507 "requires": { 1618 "requires": {
...@@ -1510,13 +1621,15 @@ ...@@ -1510,13 +1621,15 @@
1510 }, 1621 },
1511 "isarray": { 1622 "isarray": {
1512 "version": "1.0.0", 1623 "version": "1.0.0",
1513 - "bundled": true, 1624 + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
1625 + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
1514 "dev": true, 1626 "dev": true,
1515 "optional": true 1627 "optional": true
1516 }, 1628 },
1517 "minimatch": { 1629 "minimatch": {
1518 "version": "3.0.4", 1630 "version": "3.0.4",
1519 - "bundled": true, 1631 + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
1632 + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
1520 "dev": true, 1633 "dev": true,
1521 "optional": true, 1634 "optional": true,
1522 "requires": { 1635 "requires": {
...@@ -1524,14 +1637,16 @@ ...@@ -1524,14 +1637,16 @@
1524 } 1637 }
1525 }, 1638 },
1526 "minimist": { 1639 "minimist": {
1527 - "version": "1.2.5", 1640 + "version": "0.0.8",
1528 - "bundled": true, 1641 + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
1642 + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
1529 "dev": true, 1643 "dev": true,
1530 "optional": true 1644 "optional": true
1531 }, 1645 },
1532 "minipass": { 1646 "minipass": {
1533 - "version": "2.9.0", 1647 + "version": "2.3.5",
1534 - "bundled": true, 1648 + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
1649 + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
1535 "dev": true, 1650 "dev": true,
1536 "optional": true, 1651 "optional": true,
1537 "requires": { 1652 "requires": {
...@@ -1540,43 +1655,48 @@ ...@@ -1540,43 +1655,48 @@
1540 } 1655 }
1541 }, 1656 },
1542 "minizlib": { 1657 "minizlib": {
1543 - "version": "1.3.3", 1658 + "version": "1.2.1",
1544 - "bundled": true, 1659 + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz",
1660 + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==",
1545 "dev": true, 1661 "dev": true,
1546 "optional": true, 1662 "optional": true,
1547 "requires": { 1663 "requires": {
1548 - "minipass": "^2.9.0" 1664 + "minipass": "^2.2.1"
1549 } 1665 }
1550 }, 1666 },
1551 "mkdirp": { 1667 "mkdirp": {
1552 - "version": "0.5.3", 1668 + "version": "0.5.1",
1553 - "bundled": true, 1669 + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
1670 + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
1554 "dev": true, 1671 "dev": true,
1555 "optional": true, 1672 "optional": true,
1556 "requires": { 1673 "requires": {
1557 - "minimist": "^1.2.5" 1674 + "minimist": "0.0.8"
1558 } 1675 }
1559 }, 1676 },
1560 "ms": { 1677 "ms": {
1561 - "version": "2.1.2", 1678 + "version": "2.1.1",
1562 - "bundled": true, 1679 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
1680 + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
1563 "dev": true, 1681 "dev": true,
1564 "optional": true 1682 "optional": true
1565 }, 1683 },
1566 "needle": { 1684 "needle": {
1567 - "version": "2.3.3", 1685 + "version": "2.3.0",
1568 - "bundled": true, 1686 + "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz",
1687 + "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==",
1569 "dev": true, 1688 "dev": true,
1570 "optional": true, 1689 "optional": true,
1571 "requires": { 1690 "requires": {
1572 - "debug": "^3.2.6", 1691 + "debug": "^4.1.0",
1573 "iconv-lite": "^0.4.4", 1692 "iconv-lite": "^0.4.4",
1574 "sax": "^1.2.4" 1693 "sax": "^1.2.4"
1575 } 1694 }
1576 }, 1695 },
1577 "node-pre-gyp": { 1696 "node-pre-gyp": {
1578 - "version": "0.14.0", 1697 + "version": "0.12.0",
1579 - "bundled": true, 1698 + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz",
1699 + "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==",
1580 "dev": true, 1700 "dev": true,
1581 "optional": true, 1701 "optional": true,
1582 "requires": { 1702 "requires": {
...@@ -1589,12 +1709,13 @@ ...@@ -1589,12 +1709,13 @@
1589 "rc": "^1.2.7", 1709 "rc": "^1.2.7",
1590 "rimraf": "^2.6.1", 1710 "rimraf": "^2.6.1",
1591 "semver": "^5.3.0", 1711 "semver": "^5.3.0",
1592 - "tar": "^4.4.2" 1712 + "tar": "^4"
1593 } 1713 }
1594 }, 1714 },
1595 "nopt": { 1715 "nopt": {
1596 - "version": "4.0.3", 1716 + "version": "4.0.1",
1597 - "bundled": true, 1717 + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
1718 + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
1598 "dev": true, 1719 "dev": true,
1599 "optional": true, 1720 "optional": true,
1600 "requires": { 1721 "requires": {
...@@ -1603,34 +1724,27 @@ ...@@ -1603,34 +1724,27 @@
1603 } 1724 }
1604 }, 1725 },
1605 "npm-bundled": { 1726 "npm-bundled": {
1606 - "version": "1.1.1", 1727 + "version": "1.0.6",
1607 - "bundled": true, 1728 + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz",
1608 - "dev": true, 1729 + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==",
1609 - "optional": true,
1610 - "requires": {
1611 - "npm-normalize-package-bin": "^1.0.1"
1612 - }
1613 - },
1614 - "npm-normalize-package-bin": {
1615 - "version": "1.0.1",
1616 - "bundled": true,
1617 "dev": true, 1730 "dev": true,
1618 "optional": true 1731 "optional": true
1619 }, 1732 },
1620 "npm-packlist": { 1733 "npm-packlist": {
1621 - "version": "1.4.8", 1734 + "version": "1.4.1",
1622 - "bundled": true, 1735 + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz",
1736 + "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==",
1623 "dev": true, 1737 "dev": true,
1624 "optional": true, 1738 "optional": true,
1625 "requires": { 1739 "requires": {
1626 "ignore-walk": "^3.0.1", 1740 "ignore-walk": "^3.0.1",
1627 - "npm-bundled": "^1.0.1", 1741 + "npm-bundled": "^1.0.1"
1628 - "npm-normalize-package-bin": "^1.0.1"
1629 } 1742 }
1630 }, 1743 },
1631 "npmlog": { 1744 "npmlog": {
1632 "version": "4.1.2", 1745 "version": "4.1.2",
1633 - "bundled": true, 1746 + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
1747 + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
1634 "dev": true, 1748 "dev": true,
1635 "optional": true, 1749 "optional": true,
1636 "requires": { 1750 "requires": {
...@@ -1642,19 +1756,22 @@ ...@@ -1642,19 +1756,22 @@
1642 }, 1756 },
1643 "number-is-nan": { 1757 "number-is-nan": {
1644 "version": "1.0.1", 1758 "version": "1.0.1",
1645 - "bundled": true, 1759 + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
1760 + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
1646 "dev": true, 1761 "dev": true,
1647 "optional": true 1762 "optional": true
1648 }, 1763 },
1649 "object-assign": { 1764 "object-assign": {
1650 "version": "4.1.1", 1765 "version": "4.1.1",
1651 - "bundled": true, 1766 + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
1767 + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
1652 "dev": true, 1768 "dev": true,
1653 "optional": true 1769 "optional": true
1654 }, 1770 },
1655 "once": { 1771 "once": {
1656 "version": "1.4.0", 1772 "version": "1.4.0",
1657 - "bundled": true, 1773 + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
1774 + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
1658 "dev": true, 1775 "dev": true,
1659 "optional": true, 1776 "optional": true,
1660 "requires": { 1777 "requires": {
...@@ -1663,19 +1780,22 @@ ...@@ -1663,19 +1780,22 @@
1663 }, 1780 },
1664 "os-homedir": { 1781 "os-homedir": {
1665 "version": "1.0.2", 1782 "version": "1.0.2",
1666 - "bundled": true, 1783 + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
1784 + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
1667 "dev": true, 1785 "dev": true,
1668 "optional": true 1786 "optional": true
1669 }, 1787 },
1670 "os-tmpdir": { 1788 "os-tmpdir": {
1671 "version": "1.0.2", 1789 "version": "1.0.2",
1672 - "bundled": true, 1790 + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
1791 + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
1673 "dev": true, 1792 "dev": true,
1674 "optional": true 1793 "optional": true
1675 }, 1794 },
1676 "osenv": { 1795 "osenv": {
1677 "version": "0.1.5", 1796 "version": "0.1.5",
1678 - "bundled": true, 1797 + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
1798 + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
1679 "dev": true, 1799 "dev": true,
1680 "optional": true, 1800 "optional": true,
1681 "requires": { 1801 "requires": {
...@@ -1685,19 +1805,22 @@ ...@@ -1685,19 +1805,22 @@
1685 }, 1805 },
1686 "path-is-absolute": { 1806 "path-is-absolute": {
1687 "version": "1.0.1", 1807 "version": "1.0.1",
1688 - "bundled": true, 1808 + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
1809 + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
1689 "dev": true, 1810 "dev": true,
1690 "optional": true 1811 "optional": true
1691 }, 1812 },
1692 "process-nextick-args": { 1813 "process-nextick-args": {
1693 - "version": "2.0.1", 1814 + "version": "2.0.0",
1694 - "bundled": true, 1815 + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
1816 + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
1695 "dev": true, 1817 "dev": true,
1696 "optional": true 1818 "optional": true
1697 }, 1819 },
1698 "rc": { 1820 "rc": {
1699 "version": "1.2.8", 1821 "version": "1.2.8",
1700 - "bundled": true, 1822 + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
1823 + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
1701 "dev": true, 1824 "dev": true,
1702 "optional": true, 1825 "optional": true,
1703 "requires": { 1826 "requires": {
...@@ -1705,11 +1828,21 @@ ...@@ -1705,11 +1828,21 @@
1705 "ini": "~1.3.0", 1828 "ini": "~1.3.0",
1706 "minimist": "^1.2.0", 1829 "minimist": "^1.2.0",
1707 "strip-json-comments": "~2.0.1" 1830 "strip-json-comments": "~2.0.1"
1831 + },
1832 + "dependencies": {
1833 + "minimist": {
1834 + "version": "1.2.0",
1835 + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
1836 + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
1837 + "dev": true,
1838 + "optional": true
1839 + }
1708 } 1840 }
1709 }, 1841 },
1710 "readable-stream": { 1842 "readable-stream": {
1711 - "version": "2.3.7", 1843 + "version": "2.3.6",
1712 - "bundled": true, 1844 + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
1845 + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
1713 "dev": true, 1846 "dev": true,
1714 "optional": true, 1847 "optional": true,
1715 "requires": { 1848 "requires": {
...@@ -1723,8 +1856,9 @@ ...@@ -1723,8 +1856,9 @@
1723 } 1856 }
1724 }, 1857 },
1725 "rimraf": { 1858 "rimraf": {
1726 - "version": "2.7.1", 1859 + "version": "2.6.3",
1727 - "bundled": true, 1860 + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
1861 + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
1728 "dev": true, 1862 "dev": true,
1729 "optional": true, 1863 "optional": true,
1730 "requires": { 1864 "requires": {
...@@ -1733,43 +1867,50 @@ ...@@ -1733,43 +1867,50 @@
1733 }, 1867 },
1734 "safe-buffer": { 1868 "safe-buffer": {
1735 "version": "5.1.2", 1869 "version": "5.1.2",
1736 - "bundled": true, 1870 + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
1871 + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
1737 "dev": true, 1872 "dev": true,
1738 "optional": true 1873 "optional": true
1739 }, 1874 },
1740 "safer-buffer": { 1875 "safer-buffer": {
1741 "version": "2.1.2", 1876 "version": "2.1.2",
1742 - "bundled": true, 1877 + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
1878 + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
1743 "dev": true, 1879 "dev": true,
1744 "optional": true 1880 "optional": true
1745 }, 1881 },
1746 "sax": { 1882 "sax": {
1747 "version": "1.2.4", 1883 "version": "1.2.4",
1748 - "bundled": true, 1884 + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
1885 + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
1749 "dev": true, 1886 "dev": true,
1750 "optional": true 1887 "optional": true
1751 }, 1888 },
1752 "semver": { 1889 "semver": {
1753 - "version": "5.7.1", 1890 + "version": "5.7.0",
1754 - "bundled": true, 1891 + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
1892 + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
1755 "dev": true, 1893 "dev": true,
1756 "optional": true 1894 "optional": true
1757 }, 1895 },
1758 "set-blocking": { 1896 "set-blocking": {
1759 "version": "2.0.0", 1897 "version": "2.0.0",
1760 - "bundled": true, 1898 + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
1899 + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
1761 "dev": true, 1900 "dev": true,
1762 "optional": true 1901 "optional": true
1763 }, 1902 },
1764 "signal-exit": { 1903 "signal-exit": {
1765 "version": "3.0.2", 1904 "version": "3.0.2",
1766 - "bundled": true, 1905 + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
1906 + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
1767 "dev": true, 1907 "dev": true,
1768 "optional": true 1908 "optional": true
1769 }, 1909 },
1770 "string-width": { 1910 "string-width": {
1771 "version": "1.0.2", 1911 "version": "1.0.2",
1772 - "bundled": true, 1912 + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
1913 + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
1773 "dev": true, 1914 "dev": true,
1774 "optional": true, 1915 "optional": true,
1775 "requires": { 1916 "requires": {
...@@ -1780,7 +1921,8 @@ ...@@ -1780,7 +1921,8 @@
1780 }, 1921 },
1781 "string_decoder": { 1922 "string_decoder": {
1782 "version": "1.1.1", 1923 "version": "1.1.1",
1783 - "bundled": true, 1924 + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
1925 + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
1784 "dev": true, 1926 "dev": true,
1785 "optional": true, 1927 "optional": true,
1786 "requires": { 1928 "requires": {
...@@ -1789,7 +1931,8 @@ ...@@ -1789,7 +1931,8 @@
1789 }, 1931 },
1790 "strip-ansi": { 1932 "strip-ansi": {
1791 "version": "3.0.1", 1933 "version": "3.0.1",
1792 - "bundled": true, 1934 + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
1935 + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
1793 "dev": true, 1936 "dev": true,
1794 "optional": true, 1937 "optional": true,
1795 "requires": { 1938 "requires": {
...@@ -1798,34 +1941,38 @@ ...@@ -1798,34 +1941,38 @@
1798 }, 1941 },
1799 "strip-json-comments": { 1942 "strip-json-comments": {
1800 "version": "2.0.1", 1943 "version": "2.0.1",
1801 - "bundled": true, 1944 + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
1945 + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
1802 "dev": true, 1946 "dev": true,
1803 "optional": true 1947 "optional": true
1804 }, 1948 },
1805 "tar": { 1949 "tar": {
1806 - "version": "4.4.13", 1950 + "version": "4.4.8",
1807 - "bundled": true, 1951 + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz",
1952 + "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==",
1808 "dev": true, 1953 "dev": true,
1809 "optional": true, 1954 "optional": true,
1810 "requires": { 1955 "requires": {
1811 "chownr": "^1.1.1", 1956 "chownr": "^1.1.1",
1812 "fs-minipass": "^1.2.5", 1957 "fs-minipass": "^1.2.5",
1813 - "minipass": "^2.8.6", 1958 + "minipass": "^2.3.4",
1814 - "minizlib": "^1.2.1", 1959 + "minizlib": "^1.1.1",
1815 "mkdirp": "^0.5.0", 1960 "mkdirp": "^0.5.0",
1816 "safe-buffer": "^5.1.2", 1961 "safe-buffer": "^5.1.2",
1817 - "yallist": "^3.0.3" 1962 + "yallist": "^3.0.2"
1818 } 1963 }
1819 }, 1964 },
1820 "util-deprecate": { 1965 "util-deprecate": {
1821 "version": "1.0.2", 1966 "version": "1.0.2",
1822 - "bundled": true, 1967 + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
1968 + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
1823 "dev": true, 1969 "dev": true,
1824 "optional": true 1970 "optional": true
1825 }, 1971 },
1826 "wide-align": { 1972 "wide-align": {
1827 "version": "1.1.3", 1973 "version": "1.1.3",
1828 - "bundled": true, 1974 + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
1975 + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
1829 "dev": true, 1976 "dev": true,
1830 "optional": true, 1977 "optional": true,
1831 "requires": { 1978 "requires": {
...@@ -1834,13 +1981,15 @@ ...@@ -1834,13 +1981,15 @@
1834 }, 1981 },
1835 "wrappy": { 1982 "wrappy": {
1836 "version": "1.0.2", 1983 "version": "1.0.2",
1837 - "bundled": true, 1984 + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1985 + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
1838 "dev": true, 1986 "dev": true,
1839 "optional": true 1987 "optional": true
1840 }, 1988 },
1841 "yallist": { 1989 "yallist": {
1842 - "version": "3.1.1", 1990 + "version": "3.0.3",
1843 - "bundled": true, 1991 + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
1992 + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
1844 "dev": true, 1993 "dev": true,
1845 "optional": true 1994 "optional": true
1846 } 1995 }
...@@ -1883,9 +2032,9 @@ ...@@ -1883,9 +2032,9 @@
1883 "dev": true 2032 "dev": true
1884 }, 2033 },
1885 "glob": { 2034 "glob": {
1886 - "version": "7.1.6", 2035 + "version": "7.1.4",
1887 - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 2036 + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
1888 - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 2037 + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
1889 "requires": { 2038 "requires": {
1890 "fs.realpath": "^1.0.0", 2039 "fs.realpath": "^1.0.0",
1891 "inflight": "^1.0.4", 2040 "inflight": "^1.0.4",
...@@ -1953,15 +2102,36 @@ ...@@ -1953,15 +2102,36 @@
1953 } 2102 }
1954 }, 2103 },
1955 "graceful-fs": { 2104 "graceful-fs": {
1956 - "version": "4.2.3", 2105 + "version": "4.2.2",
1957 - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", 2106 + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz",
1958 - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", 2107 + "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==",
1959 "dev": true 2108 "dev": true
1960 }, 2109 },
2110 + "has-binary2": {
2111 + "version": "1.0.3",
2112 + "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
2113 + "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==",
2114 + "requires": {
2115 + "isarray": "2.0.1"
2116 + },
2117 + "dependencies": {
2118 + "isarray": {
2119 + "version": "2.0.1",
2120 + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
2121 + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
2122 + }
2123 + }
2124 + },
2125 + "has-cors": {
2126 + "version": "1.1.0",
2127 + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
2128 + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk="
2129 + },
1961 "has-flag": { 2130 "has-flag": {
1962 - "version": "4.0.0", 2131 + "version": "3.0.0",
1963 - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 2132 + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
1964 - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" 2133 + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
2134 + "dev": true
1965 }, 2135 },
1966 "has-unicode": { 2136 "has-unicode": {
1967 "version": "2.0.1", 2137 "version": "2.0.1",
...@@ -2001,17 +2171,17 @@ ...@@ -2001,17 +2171,17 @@
2001 } 2171 }
2002 }, 2172 },
2003 "hoist-non-react-statics": { 2173 "hoist-non-react-statics": {
2004 - "version": "3.3.2", 2174 + "version": "3.3.0",
2005 - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", 2175 + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz",
2006 - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", 2176 + "integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==",
2007 "requires": { 2177 "requires": {
2008 "react-is": "^16.7.0" 2178 "react-is": "^16.7.0"
2009 } 2179 }
2010 }, 2180 },
2011 "hosted-git-info": { 2181 "hosted-git-info": {
2012 - "version": "2.8.8", 2182 + "version": "2.8.4",
2013 - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", 2183 + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.4.tgz",
2014 - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", 2184 + "integrity": "sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ==",
2015 "dev": true 2185 "dev": true
2016 }, 2186 },
2017 "http-errors": { 2187 "http-errors": {
...@@ -2048,9 +2218,9 @@ ...@@ -2048,9 +2218,9 @@
2048 "dev": true 2218 "dev": true
2049 }, 2219 },
2050 "ignore-walk": { 2220 "ignore-walk": {
2051 - "version": "3.0.3", 2221 + "version": "3.0.2",
2052 - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", 2222 + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.2.tgz",
2053 - "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", 2223 + "integrity": "sha512-EXyErtpHbn75ZTsOADsfx6J/FPo6/5cjev46PXrcTpd8z3BoRkXgYu9/JVqrI7tusjmwCZutGeRJeU0Wo1e4Cw==",
2054 "requires": { 2224 "requires": {
2055 "minimatch": "^3.0.4" 2225 "minimatch": "^3.0.4"
2056 } 2226 }
...@@ -2067,6 +2237,11 @@ ...@@ -2067,6 +2237,11 @@
2067 "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 2237 "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
2068 "dev": true 2238 "dev": true
2069 }, 2239 },
2240 + "indexof": {
2241 + "version": "0.0.1",
2242 + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
2243 + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10="
2244 + },
2070 "inflight": { 2245 "inflight": {
2071 "version": "1.0.6", 2246 "version": "1.0.6",
2072 "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 2247 "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
...@@ -2101,9 +2276,9 @@ ...@@ -2101,9 +2276,9 @@
2101 "dev": true 2276 "dev": true
2102 }, 2277 },
2103 "ipaddr.js": { 2278 "ipaddr.js": {
2104 - "version": "1.9.1", 2279 + "version": "1.9.0",
2105 - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 2280 + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
2106 - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 2281 + "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
2107 }, 2282 },
2108 "is-accessor-descriptor": { 2283 "is-accessor-descriptor": {
2109 "version": "0.1.6", 2284 "version": "0.1.6",
...@@ -2377,9 +2552,9 @@ ...@@ -2377,9 +2552,9 @@
2377 "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" 2552 "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw=="
2378 }, 2553 },
2379 "kind-of": { 2554 "kind-of": {
2380 - "version": "6.0.3", 2555 + "version": "6.0.2",
2381 - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", 2556 + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
2382 - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", 2557 + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
2383 "dev": true 2558 "dev": true
2384 }, 2559 },
2385 "latest-version": { 2560 "latest-version": {
...@@ -2413,8 +2588,7 @@ ...@@ -2413,8 +2588,7 @@
2413 "lodash": { 2588 "lodash": {
2414 "version": "4.17.15", 2589 "version": "4.17.15",
2415 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 2590 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
2416 - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 2591 + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
2417 - "dev": true
2418 }, 2592 },
2419 "lodash.includes": { 2593 "lodash.includes": {
2420 "version": "4.3.0", 2594 "version": "4.3.0",
...@@ -2532,11 +2706,6 @@ ...@@ -2532,11 +2706,6 @@
2532 "p-is-promise": "^2.0.0" 2706 "p-is-promise": "^2.0.0"
2533 } 2707 }
2534 }, 2708 },
2535 - "memory-pager": {
2536 - "version": "1.5.0",
2537 - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
2538 - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg=="
2539 - },
2540 "merge-descriptors": { 2709 "merge-descriptors": {
2541 "version": "1.0.1", 2710 "version": "1.0.1",
2542 "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 2711 "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
...@@ -2574,16 +2743,16 @@ ...@@ -2574,16 +2743,16 @@
2574 "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 2743 "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
2575 }, 2744 },
2576 "mime-db": { 2745 "mime-db": {
2577 - "version": "1.43.0", 2746 + "version": "1.40.0",
2578 - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", 2747 + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
2579 - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" 2748 + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA=="
2580 }, 2749 },
2581 "mime-types": { 2750 "mime-types": {
2582 - "version": "2.1.26", 2751 + "version": "2.1.24",
2583 - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", 2752 + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
2584 - "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", 2753 + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
2585 "requires": { 2754 "requires": {
2586 - "mime-db": "1.43.0" 2755 + "mime-db": "1.40.0"
2587 } 2756 }
2588 }, 2757 },
2589 "mimic-fn": { 2758 "mimic-fn": {
...@@ -2601,25 +2770,25 @@ ...@@ -2601,25 +2770,25 @@
2601 } 2770 }
2602 }, 2771 },
2603 "minimist": { 2772 "minimist": {
2604 - "version": "1.2.5", 2773 + "version": "0.0.8",
2605 - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 2774 + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
2606 - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" 2775 + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
2607 }, 2776 },
2608 "minipass": { 2777 "minipass": {
2609 - "version": "2.9.0", 2778 + "version": "2.5.1",
2610 - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", 2779 + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.5.1.tgz",
2611 - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", 2780 + "integrity": "sha512-dmpSnLJtNQioZFI5HfQ55Ad0DzzsMAb+HfokwRTNXwEQjepbTkl5mtIlSVxGIkOkxlpX7wIn5ET/oAd9fZ/Y/Q==",
2612 "requires": { 2781 "requires": {
2613 "safe-buffer": "^5.1.2", 2782 "safe-buffer": "^5.1.2",
2614 "yallist": "^3.0.0" 2783 "yallist": "^3.0.0"
2615 } 2784 }
2616 }, 2785 },
2617 "minizlib": { 2786 "minizlib": {
2618 - "version": "1.3.3", 2787 + "version": "1.2.1",
2619 - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", 2788 + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz",
2620 - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", 2789 + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==",
2621 "requires": { 2790 "requires": {
2622 - "minipass": "^2.9.0" 2791 + "minipass": "^2.2.1"
2623 } 2792 }
2624 }, 2793 },
2625 "mixin-deep": { 2794 "mixin-deep": {
...@@ -2644,11 +2813,11 @@ ...@@ -2644,11 +2813,11 @@
2644 } 2813 }
2645 }, 2814 },
2646 "mkdirp": { 2815 "mkdirp": {
2647 - "version": "0.5.4", 2816 + "version": "0.5.1",
2648 - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", 2817 + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
2649 - "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", 2818 + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
2650 "requires": { 2819 "requires": {
2651 - "minimist": "^1.2.5" 2820 + "minimist": "0.0.8"
2652 } 2821 }
2653 }, 2822 },
2654 "moment": { 2823 "moment": {
...@@ -2657,34 +2826,42 @@ ...@@ -2657,34 +2826,42 @@
2657 "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" 2826 "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
2658 }, 2827 },
2659 "mongodb": { 2828 "mongodb": {
2660 - "version": "3.5.5", 2829 + "version": "3.3.2",
2661 - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.5.5.tgz", 2830 + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.3.2.tgz",
2662 - "integrity": "sha512-GCjDxR3UOltDq00Zcpzql6dQo1sVry60OXJY3TDmFc2SWFY6c8Gn1Ardidc5jDirvJrx2GC3knGOImKphbSL3A==", 2831 + "integrity": "sha512-fqJt3iywelk4yKu/lfwQg163Bjpo5zDKhXiohycvon4iQHbrfflSAz9AIlRE6496Pm/dQKQK5bMigdVo2s6gBg==",
2663 "requires": { 2832 "requires": {
2664 - "bl": "^2.2.0",
2665 "bson": "^1.1.1", 2833 "bson": "^1.1.1",
2666 - "denque": "^1.4.1",
2667 "require_optional": "^1.0.1", 2834 "require_optional": "^1.0.1",
2668 - "safe-buffer": "^5.1.2", 2835 + "safe-buffer": "^5.1.2"
2669 - "saslprep": "^1.0.0"
2670 } 2836 }
2671 }, 2837 },
2672 "mongoose": { 2838 "mongoose": {
2673 - "version": "5.9.7", 2839 + "version": "5.7.0",
2674 - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.9.7.tgz", 2840 + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.7.0.tgz",
2675 - "integrity": "sha512-WJOBh9WMvivqBK8my9HFtSzSySKdUxJPNGAwswEakAasWUcPXJl3yHMtZ4ngGnKbwTT9KnAr75xamlt/PouR9w==", 2841 + "integrity": "sha512-nE43r4kEUpUBfr32rf+zJKEtzd6I3F5YdbrSHp/DDdVQyej34Cv7gfBdcoRNehrPQDV3khOh0JpiS1aLN9/OCw==",
2676 "requires": { 2842 "requires": {
2843 + "async": "2.6.2",
2677 "bson": "~1.1.1", 2844 "bson": "~1.1.1",
2678 "kareem": "2.3.1", 2845 "kareem": "2.3.1",
2679 - "mongodb": "3.5.5", 2846 + "mongodb": "3.3.2",
2680 "mongoose-legacy-pluralize": "1.0.2", 2847 "mongoose-legacy-pluralize": "1.0.2",
2681 "mpath": "0.6.0", 2848 "mpath": "0.6.0",
2682 - "mquery": "3.2.2", 2849 + "mquery": "3.2.1",
2683 "ms": "2.1.2", 2850 "ms": "2.1.2",
2684 "regexp-clone": "1.0.0", 2851 "regexp-clone": "1.0.0",
2685 "safe-buffer": "5.1.2", 2852 "safe-buffer": "5.1.2",
2686 "sift": "7.0.1", 2853 "sift": "7.0.1",
2687 "sliced": "1.0.1" 2854 "sliced": "1.0.1"
2855 + },
2856 + "dependencies": {
2857 + "async": {
2858 + "version": "2.6.2",
2859 + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
2860 + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==",
2861 + "requires": {
2862 + "lodash": "^4.17.11"
2863 + }
2864 + }
2688 } 2865 }
2689 }, 2866 },
2690 "mongoose-legacy-pluralize": { 2867 "mongoose-legacy-pluralize": {
...@@ -2698,9 +2875,9 @@ ...@@ -2698,9 +2875,9 @@
2698 "integrity": "sha512-i75qh79MJ5Xo/sbhxrDrPSEG0H/mr1kcZXJ8dH6URU5jD/knFxCVqVC/gVSW7GIXL/9hHWlT9haLbCXWOll3qw==" 2875 "integrity": "sha512-i75qh79MJ5Xo/sbhxrDrPSEG0H/mr1kcZXJ8dH6URU5jD/knFxCVqVC/gVSW7GIXL/9hHWlT9haLbCXWOll3qw=="
2699 }, 2876 },
2700 "mquery": { 2877 "mquery": {
2701 - "version": "3.2.2", 2878 + "version": "3.2.1",
2702 - "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.2.tgz", 2879 + "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.1.tgz",
2703 - "integrity": "sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==", 2880 + "integrity": "sha512-kY/K8QToZWTTocm0U+r8rqcJCp5PRl6e8tPmoDs5OeSO3DInZE2rAL6AYH+V406JTo8305LdASOQcxRDqHojyw==",
2704 "requires": { 2881 "requires": {
2705 "bluebird": "3.5.1", 2882 "bluebird": "3.5.1",
2706 "debug": "3.1.0", 2883 "debug": "3.1.0",
...@@ -2745,9 +2922,9 @@ ...@@ -2745,9 +2922,9 @@
2745 } 2922 }
2746 }, 2923 },
2747 "nan": { 2924 "nan": {
2748 - "version": "2.14.0", 2925 + "version": "2.13.2",
2749 - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", 2926 + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz",
2750 - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" 2927 + "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw=="
2751 }, 2928 },
2752 "nanomatch": { 2929 "nanomatch": {
2753 "version": "1.2.13", 2930 "version": "1.2.13",
...@@ -2769,23 +2946,13 @@ ...@@ -2769,23 +2946,13 @@
2769 } 2946 }
2770 }, 2947 },
2771 "needle": { 2948 "needle": {
2772 - "version": "2.4.1", 2949 + "version": "2.4.0",
2773 - "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.1.tgz", 2950 + "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz",
2774 - "integrity": "sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g==", 2951 + "integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==",
2775 "requires": { 2952 "requires": {
2776 "debug": "^3.2.6", 2953 "debug": "^3.2.6",
2777 "iconv-lite": "^0.4.4", 2954 "iconv-lite": "^0.4.4",
2778 "sax": "^1.2.4" 2955 "sax": "^1.2.4"
2779 - },
2780 - "dependencies": {
2781 - "debug": {
2782 - "version": "3.2.6",
2783 - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
2784 - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
2785 - "requires": {
2786 - "ms": "^2.1.1"
2787 - }
2788 - }
2789 } 2956 }
2790 }, 2957 },
2791 "negotiator": { 2958 "negotiator": {
...@@ -2800,9 +2967,9 @@ ...@@ -2800,9 +2967,9 @@
2800 "dev": true 2967 "dev": true
2801 }, 2968 },
2802 "node-pre-gyp": { 2969 "node-pre-gyp": {
2803 - "version": "0.14.0", 2970 + "version": "0.12.0",
2804 - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz", 2971 + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz",
2805 - "integrity": "sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==", 2972 + "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==",
2806 "requires": { 2973 "requires": {
2807 "detect-libc": "^1.0.2", 2974 "detect-libc": "^1.0.2",
2808 "mkdirp": "^0.5.1", 2975 "mkdirp": "^0.5.1",
...@@ -2813,42 +2980,27 @@ ...@@ -2813,42 +2980,27 @@
2813 "rc": "^1.2.7", 2980 "rc": "^1.2.7",
2814 "rimraf": "^2.6.1", 2981 "rimraf": "^2.6.1",
2815 "semver": "^5.3.0", 2982 "semver": "^5.3.0",
2816 - "tar": "^4.4.2" 2983 + "tar": "^4"
2817 } 2984 }
2818 }, 2985 },
2819 "nodemon": { 2986 "nodemon": {
2820 - "version": "1.19.4", 2987 + "version": "1.19.2",
2821 - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.4.tgz", 2988 + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.2.tgz",
2822 - "integrity": "sha512-VGPaqQBNk193lrJFotBU8nvWZPqEZY2eIzymy2jjY0fJ9qIsxA0sxQ8ATPl0gZC645gijYEc1jtZvpS8QWzJGQ==", 2989 + "integrity": "sha512-hRLYaw5Ihyw9zK7NF+9EUzVyS6Cvgc14yh8CAYr38tPxJa6UrOxwAQ351GwrgoanHCF0FalQFn6w5eoX/LGdJw==",
2823 "dev": true, 2990 "dev": true,
2824 "requires": { 2991 "requires": {
2825 - "chokidar": "^2.1.8", 2992 + "chokidar": "^2.1.5",
2826 - "debug": "^3.2.6", 2993 + "debug": "^3.1.0",
2827 "ignore-by-default": "^1.0.1", 2994 "ignore-by-default": "^1.0.1",
2828 "minimatch": "^3.0.4", 2995 "minimatch": "^3.0.4",
2829 - "pstree.remy": "^1.1.7", 2996 + "pstree.remy": "^1.1.6",
2830 - "semver": "^5.7.1", 2997 + "semver": "^5.5.0",
2831 - "supports-color": "^5.5.0", 2998 + "supports-color": "^5.2.0",
2832 "touch": "^3.1.0", 2999 "touch": "^3.1.0",
2833 "undefsafe": "^2.0.2", 3000 "undefsafe": "^2.0.2",
2834 "update-notifier": "^2.5.0" 3001 "update-notifier": "^2.5.0"
2835 }, 3002 },
2836 "dependencies": { 3003 "dependencies": {
2837 - "debug": {
2838 - "version": "3.2.6",
2839 - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
2840 - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
2841 - "dev": true,
2842 - "requires": {
2843 - "ms": "^2.1.1"
2844 - }
2845 - },
2846 - "has-flag": {
2847 - "version": "3.0.0",
2848 - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
2849 - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
2850 - "dev": true
2851 - },
2852 "supports-color": { 3004 "supports-color": {
2853 "version": "5.5.0", 3005 "version": "5.5.0",
2854 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 3006 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
...@@ -2861,9 +3013,9 @@ ...@@ -2861,9 +3013,9 @@
2861 } 3013 }
2862 }, 3014 },
2863 "nopt": { 3015 "nopt": {
2864 - "version": "4.0.3", 3016 + "version": "4.0.1",
2865 - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", 3017 + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
2866 - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", 3018 + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
2867 "requires": { 3019 "requires": {
2868 "abbrev": "1", 3020 "abbrev": "1",
2869 "osenv": "^0.1.4" 3021 "osenv": "^0.1.4"
...@@ -2888,26 +3040,17 @@ ...@@ -2888,26 +3040,17 @@
2888 "dev": true 3040 "dev": true
2889 }, 3041 },
2890 "npm-bundled": { 3042 "npm-bundled": {
2891 - "version": "1.1.1", 3043 + "version": "1.0.6",
2892 - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", 3044 + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz",
2893 - "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", 3045 + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g=="
2894 - "requires": {
2895 - "npm-normalize-package-bin": "^1.0.1"
2896 - }
2897 - },
2898 - "npm-normalize-package-bin": {
2899 - "version": "1.0.1",
2900 - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
2901 - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA=="
2902 }, 3046 },
2903 "npm-packlist": { 3047 "npm-packlist": {
2904 - "version": "1.4.8", 3048 + "version": "1.4.4",
2905 - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", 3049 + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.4.tgz",
2906 - "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", 3050 + "integrity": "sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw==",
2907 "requires": { 3051 "requires": {
2908 "ignore-walk": "^3.0.1", 3052 "ignore-walk": "^3.0.1",
2909 - "npm-bundled": "^1.0.1", 3053 + "npm-bundled": "^1.0.1"
2910 - "npm-normalize-package-bin": "^1.0.1"
2911 } 3054 }
2912 }, 3055 },
2913 "npm-run-path": { 3056 "npm-run-path": {
...@@ -2940,6 +3083,11 @@ ...@@ -2940,6 +3083,11 @@
2940 "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 3083 "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
2941 "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 3084 "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
2942 }, 3085 },
3086 + "object-component": {
3087 + "version": "0.0.3",
3088 + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz",
3089 + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE="
3090 + },
2943 "object-copy": { 3091 "object-copy": {
2944 "version": "0.1.0", 3092 "version": "0.1.0",
2945 "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", 3093 "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
...@@ -3054,9 +3202,9 @@ ...@@ -3054,9 +3202,9 @@
3054 "dev": true 3202 "dev": true
3055 }, 3203 },
3056 "p-limit": { 3204 "p-limit": {
3057 - "version": "2.2.2", 3205 + "version": "2.2.1",
3058 - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", 3206 + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
3059 - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", 3207 + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
3060 "dev": true, 3208 "dev": true,
3061 "requires": { 3209 "requires": {
3062 "p-try": "^2.0.0" 3210 "p-try": "^2.0.0"
...@@ -3099,6 +3247,22 @@ ...@@ -3099,6 +3247,22 @@
3099 "json-parse-better-errors": "^1.0.1" 3247 "json-parse-better-errors": "^1.0.1"
3100 } 3248 }
3101 }, 3249 },
3250 + "parseqs": {
3251 + "version": "0.0.5",
3252 + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz",
3253 + "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=",
3254 + "requires": {
3255 + "better-assert": "~1.0.0"
3256 + }
3257 + },
3258 + "parseuri": {
3259 + "version": "0.0.5",
3260 + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz",
3261 + "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=",
3262 + "requires": {
3263 + "better-assert": "~1.0.0"
3264 + }
3265 + },
3102 "parseurl": { 3266 "parseurl": {
3103 "version": "1.3.3", 3267 "version": "1.3.3",
3104 "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 3268 "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
...@@ -3184,12 +3348,12 @@ ...@@ -3184,12 +3348,12 @@
3184 } 3348 }
3185 }, 3349 },
3186 "proxy-addr": { 3350 "proxy-addr": {
3187 - "version": "2.0.6", 3351 + "version": "2.0.5",
3188 - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", 3352 + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
3189 - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", 3353 + "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==",
3190 "requires": { 3354 "requires": {
3191 "forwarded": "~0.1.2", 3355 "forwarded": "~0.1.2",
3192 - "ipaddr.js": "1.9.1" 3356 + "ipaddr.js": "1.9.0"
3193 } 3357 }
3194 }, 3358 },
3195 "pseudomap": { 3359 "pseudomap": {
...@@ -3244,12 +3408,19 @@ ...@@ -3244,12 +3408,19 @@
3244 "ini": "~1.3.0", 3408 "ini": "~1.3.0",
3245 "minimist": "^1.2.0", 3409 "minimist": "^1.2.0",
3246 "strip-json-comments": "~2.0.1" 3410 "strip-json-comments": "~2.0.1"
3411 + },
3412 + "dependencies": {
3413 + "minimist": {
3414 + "version": "1.2.0",
3415 + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
3416 + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
3417 + }
3247 } 3418 }
3248 }, 3419 },
3249 "react-is": { 3420 "react-is": {
3250 - "version": "16.13.1", 3421 + "version": "16.9.0",
3251 - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", 3422 + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.9.0.tgz",
3252 - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" 3423 + "integrity": "sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw=="
3253 }, 3424 },
3254 "react-lifecycles-compat": { 3425 "react-lifecycles-compat": {
3255 "version": "3.0.4", 3426 "version": "3.0.4",
...@@ -3257,12 +3428,12 @@ ...@@ -3257,12 +3428,12 @@
3257 "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" 3428 "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
3258 }, 3429 },
3259 "react-redux": { 3430 "react-redux": {
3260 - "version": "5.1.2", 3431 + "version": "5.1.1",
3261 - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.1.2.tgz", 3432 + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.1.1.tgz",
3262 - "integrity": "sha512-Ns1G0XXc8hDyH/OcBHOxNgQx9ayH3SPxBnFCOidGKSle8pKihysQw2rG/PmciUQRoclhVBO8HMhiRmGXnDja9Q==", 3433 + "integrity": "sha512-LE7Ned+cv5qe7tMV5BPYkGQ5Lpg8gzgItK07c67yHvJ8t0iaD9kPFPAli/mYkiyJYrs2pJgExR2ZgsGqlrOApg==",
3263 "requires": { 3434 "requires": {
3264 "@babel/runtime": "^7.1.2", 3435 "@babel/runtime": "^7.1.2",
3265 - "hoist-non-react-statics": "^3.3.0", 3436 + "hoist-non-react-statics": "^3.1.0",
3266 "invariant": "^2.2.4", 3437 "invariant": "^2.2.4",
3267 "loose-envify": "^1.1.0", 3438 "loose-envify": "^1.1.0",
3268 "prop-types": "^15.6.1", 3439 "prop-types": "^15.6.1",
...@@ -3282,9 +3453,9 @@ ...@@ -3282,9 +3453,9 @@
3282 } 3453 }
3283 }, 3454 },
3284 "readable-stream": { 3455 "readable-stream": {
3285 - "version": "2.3.7", 3456 + "version": "2.3.6",
3286 - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 3457 + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
3287 - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 3458 + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
3288 "requires": { 3459 "requires": {
3289 "core-util-is": "~1.0.0", 3460 "core-util-is": "~1.0.0",
3290 "inherits": "~2.0.3", 3461 "inherits": "~2.0.3",
...@@ -3307,9 +3478,9 @@ ...@@ -3307,9 +3478,9 @@
3307 } 3478 }
3308 }, 3479 },
3309 "regenerator-runtime": { 3480 "regenerator-runtime": {
3310 - "version": "0.13.5", 3481 + "version": "0.13.3",
3311 - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", 3482 + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz",
3312 - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==" 3483 + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw=="
3313 }, 3484 },
3314 "regex-not": { 3485 "regex-not": {
3315 "version": "1.0.2", 3486 "version": "1.0.2",
...@@ -3385,9 +3556,9 @@ ...@@ -3385,9 +3556,9 @@
3385 } 3556 }
3386 }, 3557 },
3387 "resolve": { 3558 "resolve": {
3388 - "version": "1.15.1", 3559 + "version": "1.12.0",
3389 - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", 3560 + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
3390 - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", 3561 + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
3391 "dev": true, 3562 "dev": true,
3392 "requires": { 3563 "requires": {
3393 "path-parse": "^1.0.6" 3564 "path-parse": "^1.0.6"
...@@ -3419,9 +3590,9 @@ ...@@ -3419,9 +3590,9 @@
3419 } 3590 }
3420 }, 3591 },
3421 "rxjs": { 3592 "rxjs": {
3422 - "version": "6.5.5", 3593 + "version": "6.5.3",
3423 - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", 3594 + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz",
3424 - "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", 3595 + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
3425 "dev": true, 3596 "dev": true,
3426 "requires": { 3597 "requires": {
3427 "tslib": "^1.9.0" 3598 "tslib": "^1.9.0"
...@@ -3446,14 +3617,6 @@ ...@@ -3446,14 +3617,6 @@
3446 "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 3617 "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
3447 "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 3618 "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
3448 }, 3619 },
3449 - "saslprep": {
3450 - "version": "1.0.3",
3451 - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
3452 - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
3453 - "requires": {
3454 - "sparse-bitfield": "^3.0.3"
3455 - }
3456 - },
3457 "sax": { 3620 "sax": {
3458 "version": "1.2.4", 3621 "version": "1.2.4",
3459 "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 3622 "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
...@@ -3580,9 +3743,9 @@ ...@@ -3580,9 +3743,9 @@
3580 "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" 3743 "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g=="
3581 }, 3744 },
3582 "signal-exit": { 3745 "signal-exit": {
3583 - "version": "3.0.3", 3746 + "version": "3.0.2",
3584 - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 3747 + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
3585 - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" 3748 + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
3586 }, 3749 },
3587 "sliced": { 3750 "sliced": {
3588 "version": "1.0.1", 3751 "version": "1.0.1",
...@@ -3711,6 +3874,100 @@ ...@@ -3711,6 +3874,100 @@
3711 } 3874 }
3712 } 3875 }
3713 }, 3876 },
3877 + "socket.io": {
3878 + "version": "2.2.0",
3879 + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.2.0.tgz",
3880 + "integrity": "sha512-wxXrIuZ8AILcn+f1B4ez4hJTPG24iNgxBBDaJfT6MsyOhVYiTXWexGoPkd87ktJG8kQEcL/NBvRi64+9k4Kc0w==",
3881 + "requires": {
3882 + "debug": "~4.1.0",
3883 + "engine.io": "~3.3.1",
3884 + "has-binary2": "~1.0.2",
3885 + "socket.io-adapter": "~1.1.0",
3886 + "socket.io-client": "2.2.0",
3887 + "socket.io-parser": "~3.3.0"
3888 + },
3889 + "dependencies": {
3890 + "debug": {
3891 + "version": "4.1.1",
3892 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
3893 + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
3894 + "requires": {
3895 + "ms": "^2.1.1"
3896 + }
3897 + }
3898 + }
3899 + },
3900 + "socket.io-adapter": {
3901 + "version": "1.1.1",
3902 + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz",
3903 + "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs="
3904 + },
3905 + "socket.io-client": {
3906 + "version": "2.2.0",
3907 + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.2.0.tgz",
3908 + "integrity": "sha512-56ZrkTDbdTLmBIyfFYesgOxsjcLnwAKoN4CiPyTVkMQj3zTUh0QAx3GbvIvLpFEOvQWu92yyWICxB0u7wkVbYA==",
3909 + "requires": {
3910 + "backo2": "1.0.2",
3911 + "base64-arraybuffer": "0.1.5",
3912 + "component-bind": "1.0.0",
3913 + "component-emitter": "1.2.1",
3914 + "debug": "~3.1.0",
3915 + "engine.io-client": "~3.3.1",
3916 + "has-binary2": "~1.0.2",
3917 + "has-cors": "1.1.0",
3918 + "indexof": "0.0.1",
3919 + "object-component": "0.0.3",
3920 + "parseqs": "0.0.5",
3921 + "parseuri": "0.0.5",
3922 + "socket.io-parser": "~3.3.0",
3923 + "to-array": "0.1.4"
3924 + },
3925 + "dependencies": {
3926 + "debug": {
3927 + "version": "3.1.0",
3928 + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
3929 + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
3930 + "requires": {
3931 + "ms": "2.0.0"
3932 + }
3933 + },
3934 + "ms": {
3935 + "version": "2.0.0",
3936 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
3937 + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
3938 + }
3939 + }
3940 + },
3941 + "socket.io-parser": {
3942 + "version": "3.3.0",
3943 + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz",
3944 + "integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==",
3945 + "requires": {
3946 + "component-emitter": "1.2.1",
3947 + "debug": "~3.1.0",
3948 + "isarray": "2.0.1"
3949 + },
3950 + "dependencies": {
3951 + "debug": {
3952 + "version": "3.1.0",
3953 + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
3954 + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
3955 + "requires": {
3956 + "ms": "2.0.0"
3957 + }
3958 + },
3959 + "isarray": {
3960 + "version": "2.0.1",
3961 + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
3962 + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
3963 + },
3964 + "ms": {
3965 + "version": "2.0.0",
3966 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
3967 + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
3968 + }
3969 + }
3970 + },
3714 "source-map": { 3971 "source-map": {
3715 "version": "0.5.7", 3972 "version": "0.5.7",
3716 "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", 3973 "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
...@@ -3718,12 +3975,12 @@ ...@@ -3718,12 +3975,12 @@
3718 "dev": true 3975 "dev": true
3719 }, 3976 },
3720 "source-map-resolve": { 3977 "source-map-resolve": {
3721 - "version": "0.5.3", 3978 + "version": "0.5.2",
3722 - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", 3979 + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
3723 - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", 3980 + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==",
3724 "dev": true, 3981 "dev": true,
3725 "requires": { 3982 "requires": {
3726 - "atob": "^2.1.2", 3983 + "atob": "^2.1.1",
3727 "decode-uri-component": "^0.2.0", 3984 "decode-uri-component": "^0.2.0",
3728 "resolve-url": "^0.2.1", 3985 "resolve-url": "^0.2.1",
3729 "source-map-url": "^0.4.0", 3986 "source-map-url": "^0.4.0",
...@@ -3736,14 +3993,6 @@ ...@@ -3736,14 +3993,6 @@
3736 "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", 3993 "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
3737 "dev": true 3994 "dev": true
3738 }, 3995 },
3739 - "sparse-bitfield": {
3740 - "version": "3.0.3",
3741 - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
3742 - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
3743 - "requires": {
3744 - "memory-pager": "^1.0.2"
3745 - }
3746 - },
3747 "spawn-command": { 3996 "spawn-command": {
3748 "version": "0.0.2-1", 3997 "version": "0.0.2-1",
3749 "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", 3998 "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz",
...@@ -3860,21 +4109,30 @@ ...@@ -3860,21 +4109,30 @@
3860 "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" 4109 "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
3861 }, 4110 },
3862 "supports-color": { 4111 "supports-color": {
3863 - "version": "7.1.0", 4112 + "version": "4.5.0",
3864 - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", 4113 + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
3865 - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", 4114 + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
4115 + "dev": true,
3866 "requires": { 4116 "requires": {
3867 - "has-flag": "^4.0.0" 4117 + "has-flag": "^2.0.0"
4118 + },
4119 + "dependencies": {
4120 + "has-flag": {
4121 + "version": "2.0.0",
4122 + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
4123 + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
4124 + "dev": true
4125 + }
3868 } 4126 }
3869 }, 4127 },
3870 "tar": { 4128 "tar": {
3871 - "version": "4.4.13", 4129 + "version": "4.4.10",
3872 - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", 4130 + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.10.tgz",
3873 - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", 4131 + "integrity": "sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA==",
3874 "requires": { 4132 "requires": {
3875 "chownr": "^1.1.1", 4133 "chownr": "^1.1.1",
3876 "fs-minipass": "^1.2.5", 4134 "fs-minipass": "^1.2.5",
3877 - "minipass": "^2.8.6", 4135 + "minipass": "^2.3.5",
3878 "minizlib": "^1.2.1", 4136 "minizlib": "^1.2.1",
3879 "mkdirp": "^0.5.0", 4137 "mkdirp": "^0.5.0",
3880 "safe-buffer": "^5.1.2", 4138 "safe-buffer": "^5.1.2",
...@@ -3930,6 +4188,11 @@ ...@@ -3930,6 +4188,11 @@
3930 "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", 4188 "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=",
3931 "dev": true 4189 "dev": true
3932 }, 4190 },
4191 + "to-array": {
4192 + "version": "0.1.4",
4193 + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz",
4194 + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA="
4195 + },
3933 "to-object-path": { 4196 "to-object-path": {
3934 "version": "0.3.0", 4197 "version": "0.3.0",
3935 "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", 4198 "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
...@@ -3998,15 +4261,15 @@ ...@@ -3998,15 +4261,15 @@
3998 } 4261 }
3999 }, 4262 },
4000 "tree-kill": { 4263 "tree-kill": {
4001 - "version": "1.2.2", 4264 + "version": "1.2.1",
4002 - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", 4265 + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz",
4003 - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", 4266 + "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==",
4004 "dev": true 4267 "dev": true
4005 }, 4268 },
4006 "tslib": { 4269 "tslib": {
4007 - "version": "1.11.1", 4270 + "version": "1.10.0",
4008 - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", 4271 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
4009 - "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", 4272 + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==",
4010 "dev": true 4273 "dev": true
4011 }, 4274 },
4012 "type-is": { 4275 "type-is": {
...@@ -4024,9 +4287,9 @@ ...@@ -4024,9 +4287,9 @@
4024 "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" 4287 "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
4025 }, 4288 },
4026 "undefsafe": { 4289 "undefsafe": {
4027 - "version": "2.0.3", 4290 + "version": "2.0.2",
4028 - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz", 4291 + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz",
4029 - "integrity": "sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==", 4292 + "integrity": "sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY=",
4030 "dev": true, 4293 "dev": true,
4031 "requires": { 4294 "requires": {
4032 "debug": "^2.2.0" 4295 "debug": "^2.2.0"
...@@ -4282,12 +4545,25 @@ ...@@ -4282,12 +4545,25 @@
4282 "signal-exit": "^3.0.2" 4545 "signal-exit": "^3.0.2"
4283 } 4546 }
4284 }, 4547 },
4548 + "ws": {
4549 + "version": "6.1.4",
4550 + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz",
4551 + "integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==",
4552 + "requires": {
4553 + "async-limiter": "~1.0.0"
4554 + }
4555 + },
4285 "xdg-basedir": { 4556 "xdg-basedir": {
4286 "version": "3.0.0", 4557 "version": "3.0.0",
4287 "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", 4558 "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz",
4288 "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", 4559 "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=",
4289 "dev": true 4560 "dev": true
4290 }, 4561 },
4562 + "xmlhttprequest-ssl": {
4563 + "version": "1.5.5",
4564 + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
4565 + "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4="
4566 + },
4291 "xtend": { 4567 "xtend": {
4292 "version": "4.0.2", 4568 "version": "4.0.2",
4293 "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", 4569 "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
...@@ -4300,9 +4576,9 @@ ...@@ -4300,9 +4576,9 @@
4300 "dev": true 4576 "dev": true
4301 }, 4577 },
4302 "yallist": { 4578 "yallist": {
4303 - "version": "3.1.1", 4579 + "version": "3.0.3",
4304 - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", 4580 + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
4305 - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" 4581 + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A=="
4306 }, 4582 },
4307 "yargs": { 4583 "yargs": {
4308 "version": "12.0.5", 4584 "version": "12.0.5",
...@@ -4366,6 +4642,11 @@ ...@@ -4366,6 +4642,11 @@
4366 "camelcase": "^5.0.0", 4642 "camelcase": "^5.0.0",
4367 "decamelize": "^1.2.0" 4643 "decamelize": "^1.2.0"
4368 } 4644 }
4645 + },
4646 + "yeast": {
4647 + "version": "0.1.2",
4648 + "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
4649 + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk="
4369 } 4650 }
4370 } 4651 }
4371 } 4652 }
......
...@@ -10,25 +10,24 @@ ...@@ -10,25 +10,24 @@
10 "scripts": { 10 "scripts": {
11 "start": "node server/index.js", 11 "start": "node server/index.js",
12 "backend": "nodemon server/index.js", 12 "backend": "nodemon server/index.js",
13 - "frontend": "npm run start --prefix client", 13 + "frontend": "npm run front --prefix client",
14 "dev": "concurrently \"npm run backend\" \"npm run start --prefix client\"" 14 "dev": "concurrently \"npm run backend\" \"npm run start --prefix client\""
15 }, 15 },
16 "author": "John ahn", 16 "author": "John ahn",
17 "license": "ISC", 17 "license": "ISC",
18 "dependencies": { 18 "dependencies": {
19 + "async": "^3.1.0",
19 "bcrypt": "^3.0.6", 20 "bcrypt": "^3.0.6",
20 "body-parser": "^1.18.3", 21 "body-parser": "^1.18.3",
21 "cookie-parser": "^1.4.3", 22 "cookie-parser": "^1.4.3",
22 "cors": "^2.8.5", 23 "cors": "^2.8.5",
23 - "debug": "^4.1.1",
24 "express": "^4.17.1", 24 "express": "^4.17.1",
25 "jsonwebtoken": "^8.5.1", 25 "jsonwebtoken": "^8.5.1",
26 "moment": "^2.24.0", 26 "moment": "^2.24.0",
27 "mongoose": "^5.4.20", 27 "mongoose": "^5.4.20",
28 "multer": "^1.4.2", 28 "multer": "^1.4.2",
29 "react-redux": "^5.0.7", 29 "react-redux": "^5.0.7",
30 - "saslprep": "^1.0.3", 30 + "socket.io": "^2.2.0"
31 - "supports-color": "^7.1.0"
32 }, 31 },
33 "devDependencies": { 32 "devDependencies": {
34 "concurrently": "^4.1.0", 33 "concurrently": "^4.1.0",
......
1 +dev.js
...\ No newline at end of file ...\ No newline at end of file
1 -// development모드이면 process.env.NODE_ENV는 development라고 나오고 1 +if (process.env.NODE_ENV === 'production') {
2 -// production모드이면 production이라고 나옴 2 + module.exports = require('./prod');
3 -if(process.env.NODE_ENV === 'production') // === 는 형변환을 하지 않음. 3 +} else {
4 - // ex) true == 1 -> return true 4 + module.exports = require('./dev');
5 - // true === 1 -> return false
6 -{
7 - module.exports = require('./prod')
8 -}
9 -
10 -else
11 -{
12 - module.exports = require('./dev')
13 } 5 }
...\ No newline at end of file ...\ No newline at end of file
......
1 -module.exports ={ 1 +module.exports = {
2 - mongoURI: process.env.mongo_URI 2 + mongoURI:process.env.MONGO_URI
3 } 3 }
...\ No newline at end of file ...\ No newline at end of file
......
1 -const express = require("express") 1 +const express = require("express");
2 -const app = express() 2 +const app = express();
3 -const port = process.env.PORT || 5000
4 -
5 const path = require("path"); 3 const path = require("path");
6 const cors = require('cors') 4 const cors = require('cors')
7 5
8 -// body-parser 가져옴 6 +const bodyParser = require("body-parser");
9 -const bodyParser = require('body-parser')
10 -// bodyParser option
11 -app.use(bodyParser.urlencoded({ extended: true })) //application/x-www-form-urlencoded로 된 데이터를 분석해서 가져옴
12 -app.use(bodyParser.json()) // application/json 타입으로 된 데이터를 분석해서 가져옴
13 const cookieParser = require("cookie-parser"); 7 const cookieParser = require("cookie-parser");
14 -app.use(cookieParser()); 8 +
15 const config = require("./config/key"); 9 const config = require("./config/key");
16 10
11 +// const mongoose = require("mongoose");
12 +// mongoose
13 +// .connect(config.mongoURI, { useNewUrlParser: true })
14 +// .then(() => console.log("DB connected"))
15 +// .catch(err => console.error(err));
17 16
18 const mongoose = require("mongoose"); 17 const mongoose = require("mongoose");
19 - 18 +const connect = mongoose.connect(config.mongoURI, { useNewUrlParser: true, useUnifiedTopology: true })
20 - 19 + .then(() => console.log('MongoDB Connected...'))
21 -const connect = mongoose.connect(config.mongoURI,
22 - {
23 - useNewUrlParser: true, useUnifiedTopology: true,
24 - useCreateIndex: true, useFindAndModify: false
25 - })
26 - .then(() => console.log('MongoDB ---> Connected'))
27 .catch(err => console.log(err)); 20 .catch(err => console.log(err));
28 21
29 app.use(cors()) 22 app.use(cors())
30 23
24 +app.use(bodyParser.urlencoded({ extended: true }));
25 +app.use(bodyParser.json());
26 +app.use(cookieParser());
31 27
32 app.use('/api/users', require('./routes/users')); 28 app.use('/api/users', require('./routes/users'));
33 app.use('/api/product', require('./routes/product')); 29 app.use('/api/product', require('./routes/product'));
34 30
35 -// 업로드 하려고 31 +
32 +//use this to show the image you have in node js server to client (react js)
33 +//https://stackoverflow.com/questions/48914987/send-image-path-from-node-js-express-server-to-react-client
36 app.use('/uploads', express.static('uploads')); 34 app.use('/uploads', express.static('uploads'));
37 35
36 +// Serve static assets if in production
38 if (process.env.NODE_ENV === "production") { 37 if (process.env.NODE_ENV === "production") {
38 +
39 + // Set static folder
39 app.use(express.static("client/build")); 40 app.use(express.static("client/build"));
41 +
42 + // index.html for all page routes
40 app.get("*", (req, res) => { 43 app.get("*", (req, res) => {
41 res.sendFile(path.resolve(__dirname, "../client", "build", "index.html")); 44 res.sendFile(path.resolve(__dirname, "../client", "build", "index.html"));
42 }); 45 });
43 } 46 }
44 47
48 +const port = process.env.PORT || 5000
45 49
46 app.listen(port, () => { 50 app.listen(port, () => {
47 - console.log(`Server ---> http://localhost:${port}`) 51 + console.log(`Server Running at ${port}`)
48 -}); 52 +});
...\ No newline at end of file ...\ No newline at end of file
......
1 const { User } = require('../models/User'); 1 const { User } = require('../models/User');
2 2
3 let auth = (req, res, next) => { 3 let auth = (req, res, next) => {
4 - // 인증 처리
5 - // 1. client 쿠키에서 토큰을 가져옴.
6 let token = req.cookies.w_auth; 4 let token = req.cookies.w_auth;
7 5
8 - // 2. 토큰을 복호화한 후 유저를 찾는다. (User.js에 findByToken(); 있음) 6 + User.findByToken(token, (err, user) => {
9 - User.findByToken(token, (err, user)=>{ 7 + if (err) throw err;
10 - // 에러가 있으면 8 + if (!user)
11 - if(err) throw err; 9 + return res.json({
12 - // 유저가 없으면 10 + isAuth: false,
13 - if(!user) return res.json({ isAuth:false, error: true}) 11 + error: true
14 - // 에러도 없고 유저도 있으면 12 + });
15 - req.token = token; // token과 user를 request에 넣어줌으로써 index.js에서 request 사용할 수 있음 13 +
14 + req.token = token;
16 req.user = user; 15 req.user = user;
17 next(); 16 next();
18 -}); 17 + });
19 - 18 +};
20 -// 3. 유저가 있으면 인증OK, 유저가 없으면 인증No!
21 -}
22 19
23 -// 이 auth를 다른 파일에서도 쓸 수 있도록
24 -module.exports = { auth };
...\ No newline at end of file ...\ No newline at end of file
20 +module.exports = { auth };
......
1 +const mongoose = require('mongoose');
2 +
3 +const paymentSchema = mongoose.Schema({
4 + user: { // 구매자 정보
5 + type: Array,
6 + default: []
7 + },
8 + data: { // 구매일자 정보
9 + type: Array,
10 + default: []
11 + },
12 + product: { // 상품 정보
13 + type: Array,
14 + default: []
15 + }
16 +
17 +
18 +}, { timestamps: true })
19 +
20 +
21 +const Payment = mongoose.model('Payment', paymentSchema);
22 +
23 +module.exports = { Payment }
...\ No newline at end of file ...\ No newline at end of file
1 +const mongoose = require('mongoose');
2 +const Schema = mongoose.Schema;
3 +
4 +const productSchema = mongoose.Schema({
5 + writer: {
6 + type: Schema.Types.ObjectId,
7 + ref: 'User'
8 + },
9 + title: {
10 + type: String,
11 + maxlength: 50
12 + },
13 + description: {
14 + type: String
15 + },
16 + price: {
17 + type: Number,
18 + default: 0
19 + },
20 + images: {
21 + type: Array,
22 + default: []
23 + },
24 + continents: {
25 + type: Number,
26 + default: 1
27 + },
28 + sold: {
29 + type: Number,
30 + maxlength: 100,
31 + default: 0
32 + },
33 + views: {
34 + type: Number,
35 + default: 0
36 + }
37 +}, { timestamps: true })
38 +
39 +
40 +productSchema.index({
41 + title:'text',
42 + description: 'text',
43 +}, {
44 + weights: {
45 + name: 5,
46 + description: 1,
47 + }
48 +})
49 +
50 +const Product = mongoose.model('Product', productSchema);
51 +
52 +module.exports = { Product }
...\ No newline at end of file ...\ No newline at end of file
1 -// monggoDB Model and Schema
2 const mongoose = require('mongoose'); 1 const mongoose = require('mongoose');
3 -// bcrypt 가져옴 2 +const bcrypt = require('bcrypt');
4 -const bcrypt = require('bcrypt') 3 +const saltRounds = 10;
5 -// bcrypt 사용하기 위해 salt를 생성하고 그걸 이용해 암호화 시킴
6 -const saltRounds = 10 // salt를 몇글자 할 건지
7 -
8 const jwt = require('jsonwebtoken'); 4 const jwt = require('jsonwebtoken');
9 -const moment = require("moment"); 5 +const moment = require('moment');
10 6
11 const userSchema = mongoose.Schema({ 7 const userSchema = mongoose.Schema({
12 name: { 8 name: {
13 - type:String, 9 + type: String,
14 - maxlength:50 10 + maxlength: 50
15 }, 11 },
16 email: { 12 email: {
17 - type:String, 13 + type: String,
18 - trim:true, 14 + trim: true,
19 - unique: 1 15 + unique: 1
20 }, 16 },
21 password: { 17 password: {
22 type: String, 18 type: String,
23 - minglength: 3 19 + minlength: 5
24 }, 20 },
25 - lastname: { 21 + adress: {
26 - type:String, 22 + type: String,
27 - maxlength: 50 23 + maxlength: 100
24 + },
25 + role: {
26 + type: Number,
27 + default: 0
28 }, 28 },
29 - role : { 29 + cart: {
30 - type:Number, // Number==1 이면 관리자, number==0 이면 일반 유저 30 + type: Array,
31 - default: 0 // default는 0 31 + default: []
32 + },
33 + history: {
34 + type: Array,
35 + default: []
32 }, 36 },
33 image: String, 37 image: String,
34 - token : { 38 + token: {
35 type: String, 39 type: String,
36 }, 40 },
37 - tokenExp :{ 41 + tokenExp: {
38 type: Number 42 type: Number
39 } 43 }
40 }) 44 })
41 45
42 -// index.js의 app.post('/register', (req, res)에 있는 46 +userSchema.pre('save', function (next) {
43 -// user model에 user 정보를 저장하기 전에 무엇을 한다는 것
44 -// function( next )를 해서 얘네가 끝난 다음에 다음걸 실행해라~
45 -userSchema.pre('save', function( next ) {
46 var user = this; 47 var user = this;
47 - 48 +
48 - if(user.isModified('password')){ // password를 변경할 때만 적용되도록.. 49 + if (user.isModified('password')) {
49 - 50 + console.log('password changed')
50 - // 비밀번호 암호화 (https://www.npmjs.com/package/bcrypt 에서 가져옴) 51 + bcrypt.genSalt(saltRounds, function (err, salt) {
51 - bcrypt.genSalt(saltRounds, (err, salt) => // salt를 만드는 함수 52 + if (err) return next(err);
52 - { 53 +
53 - if(err) return next(err) // 에러 나면 return err 54 + bcrypt.hash(user.password, salt, function (err, hash) {
54 - bcrypt.hash(user.password, salt, (err, hash) => { // bcrypt.hash(암호화되지 않은 pw, salt, function(err, 암호화된 비밀번호)) 55 + if (err) return next(err);
55 - if(err) return next(err) // 에러 나면 return err 56 + user.password = hash
56 - user.password = hash // 성공하면 user.password를 hash로 교체 57 + next()
57 - next()
58 }) 58 })
59 }) 59 })
60 } else { 60 } else {
...@@ -62,44 +62,35 @@ userSchema.pre('save', function( next ) { ...@@ -62,44 +62,35 @@ userSchema.pre('save', function( next ) {
62 } 62 }
63 }); 63 });
64 64
65 -userSchema.methods.comparePassword = function(plainPassword,cb){ 65 +userSchema.methods.comparePassword = function (plainPassword, cb) {
66 - 66 + bcrypt.compare(plainPassword, this.password, function (err, isMatch) {
67 - // 1. plainPassword가 1234567 암호화된 비밀번호 가 같은지 체크해야함 67 + if (err) return cb(err);
68 - // 그러면 plainPassword도 암호화해서 비교해야함. (복호화 할 수 없기 때문에) 68 + cb(null, isMatch)
69 - bcrypt.compare(plainPassword, this.password, function(err, isMatch)
70 - { // 에러가 나면 err callback, 아니면 isMatch
71 - if(err) return cb(err);
72 - cb(null, isMatch);
73 }) 69 })
74 } 70 }
75 71
76 -userSchema.methods.generateToken = function(cb) { 72 +userSchema.methods.generateToken = function (cb) {
77 var user = this; 73 var user = this;
78 - // jsonwebtoken을 이용해서 token 생성 74 + var token = jwt.sign(user._id.toHexString(), 'secret')
79 - var token = jwt.sign(user._id.toHexString(), 'secretToken') //database에 있는 id라서 _id
80 var oneHour = moment().add(1, 'hour').valueOf(); 75 var oneHour = moment().add(1, 'hour').valueOf();
81 76
82 user.tokenExp = oneHour; 77 user.tokenExp = oneHour;
83 user.token = token; 78 user.token = token;
84 - user.save(function (err, user){ 79 + user.save(function (err, user) {
85 - if(err) return cb(err)// 에러가 있다면 callback으로 에러 전달 80 + if (err) return cb(err)
86 - cb(null, user) // 에러가 없다면 err는 없고 user정보만 전달 81 + cb(null, user);
87 }) 82 })
88 } 83 }
89 84
90 userSchema.statics.findByToken = function (token, cb) { 85 userSchema.statics.findByToken = function (token, cb) {
91 var user = this; 86 var user = this;
92 87
93 - // 1. 토큰을 decoding 88 + jwt.verify(token, 'secret', function (err, decode) {
94 - jwt.verify(token, 'secretToken', function(err, decoded) { 89 + user.findOne({ "_id": decode, "token": token }, function (err, user) {
95 - // 2. 유저 아이디를 이용해서 유저를 찾은 다음에 클라이언트에서 가져온 토큰과 DB에 보관된 토큰이 일치하는지 확인. 90 + if (err) return cb(err);
96 - user.findOne({"_id": decoded, "token": token}, function(err, user){ // findOne :: mongoDB에 이미 있는 method 91 + cb(null, user);
97 - // 에러가 나면 92 + })
98 - if(err) return cb(err); 93 + })
99 - // 에러가 안나면
100 - cb(null, user)
101 - })
102 -})
103 } 94 }
104 95
105 const User = mongoose.model('User', userSchema); 96 const User = mongoose.model('User', userSchema);
......
1 const express = require('express'); 1 const express = require('express');
2 -const { User } = require("../models/User");
3 -const { auth } = require("../middleware/auth");
4 const router = express.Router(); 2 const router = express.Router();
3 +const { Product } = require("../models/Product");
5 const multer = require('multer'); 4 const multer = require('multer');
6 5
6 +const { auth } = require("../middleware/auth");
7 7
8 var storage = multer.diskStorage({ 8 var storage = multer.diskStorage({
9 - destination: function (req, file, cb) { 9 + destination: (req, file, cb) => {
10 - cb(null, 'uploads/') // 어느 폴더에 저장할건지 10 + cb(null, 'uploads/')
11 + },
12 + filename: (req, file, cb) => {
13 + cb(null, `${Date.now()}_${file.originalname}`)
11 }, 14 },
12 - filename: function (req, file, cb) { 15 + fileFilter: (req, file, cb) => {
13 - cb(null, Date.now() + '_' + file.originalname) // 이미지 이름 16 + const ext = path.extname(file.originalname)
14 - } 17 + if (ext !== '.jpg' || ext !== '.png') {
15 - }) 18 + return cb(res.status(400).end('JPG, PNG 확장자만 가능합니다.'), false);
16 - 19 + }
17 -var upload = multer({ storage: storage }).single("file"); 20 + cb(null, true)
18 -
19 -router.post('/image', (req, res) => {
20 -
21 - // 클라이언트로부터 받은 이미지 저장
22 - upload(req, res, (err) => {
23 - if (err) {
24 - return req.json({ success: false, err })
25 - }
26 - return res.json({ success: true, filePath: res.req.file.path, fileName: res.req.file.filename })
27 } 21 }
28 - )
29 -
30 }) 22 })
31 23
24 +var upload = multer({ storage: storage }).single("file")
25 +
26 +
27 +router.post("/uploadImage", auth, (req, res) => {
28 +
29 + upload(req, res, err => {
30 + if (err) {
31 + return res.json({ success: false, err })
32 + }
33 + return res.json({ success: true, image: res.req.file.path, fileName: res.req.file.filename })
34 + })
35 +
36 +});
37 +
38 +
39 +router.post("/uploadProduct", auth, (req, res) => {
40 +
41 + //save all the data we got from the client into the DB
42 + const product = new Product(req.body)
43 +
44 + product.save((err) => {
45 + if (err) return res.status(400).json({ success: false, err })
46 + return res.status(200).json({ success: true })
47 + })
48 +
49 +});
50 +
51 +
52 +router.post("/getProducts", (req, res) => {
53 +
54 + let order = req.body.order ? req.body.order : "desc";
55 + let sortBy = req.body.sortBy ? req.body.sortBy : "_id";
56 + let limit = req.body.limit ? parseInt(req.body.limit) : 100;
57 + let skip = parseInt(req.body.skip);
58 +
59 + let findArgs = {};
60 + let term = req.body.searchTerm;
61 +
62 + for (let key in req.body.filters) {
63 +
64 + if (req.body.filters[key].length > 0) {
65 + if (key === "price") {
66 + findArgs[key] = {
67 + $gte: req.body.filters[key][0],
68 + $lte: req.body.filters[key][1]
69 + }
70 + } else {
71 + findArgs[key] = req.body.filters[key];
72 + }
73 + }
74 + }
75 +
76 + console.log(findArgs)
77 +
78 + if (term) {
79 + Product.find(findArgs)
80 + .find({ $text: { $search: term } })
81 + .populate("writer")
82 + .sort([[sortBy, order]])
83 + .skip(skip)
84 + .limit(limit)
85 + .exec((err, products) => {
86 + if (err) return res.status(400).json({ success: false, err })
87 + res.status(200).json({ success: true, products, postSize: products.length })
88 + })
89 + } else {
90 + Product.find(findArgs)
91 + .populate("writer")
92 + .sort([[sortBy, order]])
93 + .skip(skip)
94 + .limit(limit)
95 + .exec((err, products) => {
96 + if (err) return res.status(400).json({ success: false, err })
97 + res.status(200).json({ success: true, products, postSize: products.length })
98 + })
99 + }
100 +
101 +});
102 +
103 +
104 +//?id=${productId}&type=single
105 +//id=12121212,121212,1212121 type=array
106 +router.get("/products_by_id", (req, res) => {
107 + let type = req.query.type
108 + let productIds = req.query.id
109 +
110 + console.log("req.query.id", req.query.id)
111 +
112 + if (type === "array") {
113 + let ids = req.query.id.split(',');
114 + productIds = [];
115 + productIds = ids.map(item => {
116 + return item
117 + })
118 + }
119 +
120 + console.log("productIds", productIds)
121 +
122 +
123 + //we need to find the product information that belong to product Id
124 + Product.find({ '_id': { $in: productIds } })
125 + .populate('writer')
126 + .exec((err, product) => {
127 + if (err) return res.status(400).send(err)
128 + return res.status(200).send(product)
129 + })
130 +});
131 +
132 +
133 +
32 module.exports = router; 134 module.exports = router;
......
1 const express = require('express'); 1 const express = require('express');
2 +const router = express.Router();
2 const { User } = require("../models/User"); 3 const { User } = require("../models/User");
4 +const { Product } = require('../models/Product');
3 const { auth } = require("../middleware/auth"); 5 const { auth } = require("../middleware/auth");
4 -const router = express.Router(); 6 +const { Payment } = require('../models/Payment');
7 +
8 +const async = require('async');
9 +
10 +
5 11
6 router.get("/auth", auth, (req, res) => { 12 router.get("/auth", auth, (req, res) => {
7 res.status(200).json({ 13 res.status(200).json({
...@@ -10,9 +16,11 @@ router.get("/auth", auth, (req, res) => { ...@@ -10,9 +16,11 @@ router.get("/auth", auth, (req, res) => {
10 isAuth: true, 16 isAuth: true,
11 email: req.user.email, 17 email: req.user.email,
12 name: req.user.name, 18 name: req.user.name,
13 - lastname: req.user.lastname, 19 + address: req.user.address,
14 role: req.user.role, 20 role: req.user.role,
15 image: req.user.image, 21 image: req.user.image,
22 + cart: req.user.cart,
23 + history: req.user.history
16 }); 24 });
17 }); 25 });
18 26
...@@ -33,12 +41,12 @@ router.post("/login", (req, res) => { ...@@ -33,12 +41,12 @@ router.post("/login", (req, res) => {
33 if (!user) 41 if (!user)
34 return res.json({ 42 return res.json({
35 loginSuccess: false, 43 loginSuccess: false,
36 - message: "Auth failed, email not found" 44 + message: "존재하지 않는 계정입니다."
37 }); 45 });
38 46
39 user.comparePassword(req.body.password, (err, isMatch) => { 47 user.comparePassword(req.body.password, (err, isMatch) => {
40 if (!isMatch) 48 if (!isMatch)
41 - return res.json({ loginSuccess: false, message: "Wrong password" }); 49 + return res.json({ loginSuccess: false, message: "비밀번호가 다릅니다." });
42 50
43 user.generateToken((err, user) => { 51 user.generateToken((err, user) => {
44 if (err) return res.status(400).send(err); 52 if (err) return res.status(400).send(err);
...@@ -63,4 +71,185 @@ router.get("/logout", auth, (req, res) => { ...@@ -63,4 +71,185 @@ router.get("/logout", auth, (req, res) => {
63 }); 71 });
64 }); 72 });
65 73
74 +
75 +router.get('/addToCart', auth, (req, res) => {
76 +
77 + User.findOne({ _id: req.user._id }, (err, userInfo) => {
78 + let duplicate = false;
79 +
80 + console.log(userInfo)
81 +
82 + userInfo.cart.forEach((item) => {
83 + if (item.id == req.query.productId) {
84 + duplicate = true;
85 + }
86 + })
87 +
88 +
89 + if (duplicate) {
90 + User.findOneAndUpdate(
91 + { _id: req.user._id, "cart.id": req.query.productId },
92 + { $inc: { "cart.$.quantity": 1 } },
93 + { new: true },
94 + (err, userInfo) => {
95 + if (err) return res.json({ success: false, err });
96 + res.status(200).json(userInfo.cart)
97 + }
98 + )
99 + } else {
100 + User.findOneAndUpdate(
101 + { _id: req.user._id },
102 + {
103 + $push: {
104 + cart: {
105 + id: req.query.productId,
106 + quantity: 1,
107 + date: Date.now()
108 + }
109 + }
110 + },
111 + { new: true },
112 + (err, userInfo) => {
113 + if (err) return res.json({ success: false, err });
114 + res.status(200).json(userInfo.cart)
115 + }
116 + )
117 + }
118 + })
119 +});
120 +
121 +
122 +router.get('/removeFromCart', auth, (req, res) => {
123 +
124 + User.findOneAndUpdate(
125 + { _id: req.user._id },
126 + {
127 + "$pull":
128 + { "cart": { "id": req.query._id } }
129 + },
130 + { new: true },
131 + (err, userInfo) => {
132 + let cart = userInfo.cart;
133 + let array = cart.map(item => {
134 + return item.id
135 + })
136 +
137 + Product.find({ '_id': { $in: array } })
138 + .populate('writer')
139 + .exec((err, cartDetail) => {
140 + return res.status(200).json({
141 + cartDetail,
142 + cart
143 + })
144 + })
145 + }
146 + )
147 +})
148 +
149 +
150 +router.get('/userCartInfo', auth, (req, res) => {
151 + User.findOne(
152 + { _id: req.user._id },
153 + (err, userInfo) => {
154 + let cart = userInfo.cart;
155 + let array = cart.map(item => {
156 + return item.id
157 + })
158 +
159 +
160 + Product.find({ '_id': { $in: array } })
161 + .populate('writer')
162 + .exec((err, cartDetail) => {
163 + if (err) return res.status(400).send(err);
164 + return res.status(200).json({ success: true, cartDetail, cart })
165 + })
166 +
167 + }
168 + )
169 +})
170 +
171 +
172 +
173 +
174 +router.post('/successBuy', auth, (req, res) => {
175 + let history = [];
176 + let transactionData = {};
177 +
178 + req.body.cartDetail.forEach((item) => {
179 + history.push({
180 + dateOfPurchase: Date.now(),
181 + name: item.title,
182 + id: item._id,
183 + price: item.price,
184 + quantity: item.quantity,
185 + paymentId: req.body.paymentData.paymentID
186 + })
187 + })
188 +
189 + // 페이팔에서 받아온 데이터 넣음
190 + transactionData.user = {
191 + id: req.user._id,
192 + name: req.user.name,
193 + address: req.user.address,
194 + email: req.user.email
195 + }
196 +
197 + transactionData.data = req.body.paymentData;
198 + transactionData.product = history
199 +
200 +
201 + User.findOneAndUpdate(
202 + { _id: req.user._id },
203 + { $push: { history: history }, $set: { cart: [] } },
204 + { new: true },
205 + (err, user) => {
206 + if (err) return res.json({ success: false, err });
207 +
208 +
209 + const payment = new Payment(transactionData)
210 + payment.save((err, doc) => {
211 + if (err) return res.json({ success: false, err });
212 + let products = [];
213 + doc.product.forEach(item => {
214 + products.push({ id: item.id, quantity: item.quantity })
215 + })
216 +
217 + async.eachSeries(products, (item, callback) => {
218 + Product.update(
219 + { _id: item.id },
220 + {
221 + $inc: {
222 + "sold": item.quantity
223 + }
224 + },
225 + { new: false },
226 + callback
227 + )
228 + }, (err) => {
229 + if (err) return res.json({ success: false, err })
230 + res.status(200).json({
231 + success: true,
232 + cart: user.cart,
233 + cartDetail: []
234 + })
235 + })
236 +
237 + })
238 + }
239 + )
240 +})
241 +
242 +
243 +router.get('/getHistory', auth, (req, res) => {
244 + User.findOne(
245 + { _id: req.user._id },
246 + (err, doc) => {
247 + let history = doc.history;
248 + if (err) return res.status(400).send(err)
249 + return res.status(200).json({ success: true, history })
250 + }
251 + )
252 +})
253 +
254 +
66 module.exports = router; 255 module.exports = router;
......