최동원

Merge branch 'master' into 'share,favorite'

# Conflicts:
#   backend/app.js
...@@ -38,6 +38,15 @@ ...@@ -38,6 +38,15 @@
38 "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", 38 "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz",
39 "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==" 39 "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ=="
40 }, 40 },
41 + "adler-32": {
42 + "version": "1.2.0",
43 + "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.2.0.tgz",
44 + "integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=",
45 + "requires": {
46 + "exit-on-epipe": "~1.0.1",
47 + "printj": "~1.1.0"
48 + }
49 + },
41 "ajv": { 50 "ajv": {
42 "version": "6.12.2", 51 "version": "6.12.2",
43 "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", 52 "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
...@@ -57,6 +66,11 @@ ...@@ -57,6 +66,11 @@
57 "color-convert": "^1.9.0" 66 "color-convert": "^1.9.0"
58 } 67 }
59 }, 68 },
69 + "append-field": {
70 + "version": "1.0.0",
71 + "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
72 + "integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY="
73 + },
60 "array-flatten": { 74 "array-flatten": {
61 "version": "1.1.1", 75 "version": "1.1.1",
62 "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 76 "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
...@@ -196,6 +210,43 @@ ...@@ -196,6 +210,43 @@
196 "isarray": "^1.0.0" 210 "isarray": "^1.0.0"
197 } 211 }
198 }, 212 },
213 + "buffer-from": {
214 + "version": "1.1.1",
215 + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
216 + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
217 + },
218 + "busboy": {
219 + "version": "0.2.14",
220 + "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz",
221 + "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=",
222 + "requires": {
223 + "dicer": "0.2.5",
224 + "readable-stream": "1.1.x"
225 + },
226 + "dependencies": {
227 + "isarray": {
228 + "version": "0.0.1",
229 + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
230 + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
231 + },
232 + "readable-stream": {
233 + "version": "1.1.14",
234 + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
235 + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
236 + "requires": {
237 + "core-util-is": "~1.0.0",
238 + "inherits": "~2.0.1",
239 + "isarray": "0.0.1",
240 + "string_decoder": "~0.10.x"
241 + }
242 + },
243 + "string_decoder": {
244 + "version": "0.10.31",
245 + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
246 + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
247 + }
248 + }
249 + },
199 "bytes": { 250 "bytes": {
200 "version": "3.0.0", 251 "version": "3.0.0",
201 "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", 252 "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
...@@ -206,6 +257,17 @@ ...@@ -206,6 +257,17 @@
206 "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 257 "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
207 "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" 258 "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
208 }, 259 },
260 + "cfb": {
261 + "version": "1.1.4",
262 + "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.1.4.tgz",
263 + "integrity": "sha512-rwFkl3aFO3f+ljR27YINwC0x8vPjyiEVbYbrTCKzspEf7Q++3THdfHVgJYNUbxNcupJECrLX+L40Mjm9hm/Bgw==",
264 + "requires": {
265 + "adler-32": "~1.2.0",
266 + "commander": "^2.16.0",
267 + "crc-32": "~1.2.0",
268 + "printj": "~1.1.2"
269 + }
270 + },
209 "chalk": { 271 "chalk": {
210 "version": "2.4.2", 272 "version": "2.4.2",
211 "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 273 "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
...@@ -224,6 +286,22 @@ ...@@ -224,6 +286,22 @@
224 "is-regex": "^1.0.3" 286 "is-regex": "^1.0.3"
225 } 287 }
226 }, 288 },
289 + "codepage": {
290 + "version": "1.14.0",
291 + "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.14.0.tgz",
292 + "integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=",
293 + "requires": {
294 + "commander": "~2.14.1",
295 + "exit-on-epipe": "~1.0.1"
296 + },
297 + "dependencies": {
298 + "commander": {
299 + "version": "2.14.1",
300 + "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz",
301 + "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw=="
302 + }
303 + }
304 + },
227 "color-convert": { 305 "color-convert": {
228 "version": "1.9.3", 306 "version": "1.9.3",
229 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 307 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
...@@ -245,11 +323,27 @@ ...@@ -245,11 +323,27 @@
245 "delayed-stream": "~1.0.0" 323 "delayed-stream": "~1.0.0"
246 } 324 }
247 }, 325 },
326 + "commander": {
327 + "version": "2.17.1",
328 + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
329 + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg=="
330 + },
248 "concat-map": { 331 "concat-map": {
249 "version": "0.0.1", 332 "version": "0.0.1",
250 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 333 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
251 "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 334 "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
252 }, 335 },
336 + "concat-stream": {
337 + "version": "1.6.2",
338 + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
339 + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
340 + "requires": {
341 + "buffer-from": "^1.0.0",
342 + "inherits": "^2.0.3",
343 + "readable-stream": "^2.2.2",
344 + "typedarray": "^0.0.6"
345 + }
346 + },
253 "constantinople": { 347 "constantinople": {
254 "version": "4.0.1", 348 "version": "4.0.1",
255 "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz", 349 "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz",
...@@ -293,6 +387,15 @@ ...@@ -293,6 +387,15 @@
293 "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 387 "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
294 "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 388 "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
295 }, 389 },
390 + "crc-32": {
391 + "version": "1.2.0",
392 + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz",
393 + "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==",
394 + "requires": {
395 + "exit-on-epipe": "~1.0.1",
396 + "printj": "~1.1.0"
397 + }
398 + },
296 "crypto-js": { 399 "crypto-js": {
297 "version": "4.0.0", 400 "version": "4.0.0",
298 "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz", 401 "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz",
...@@ -314,6 +417,11 @@ ...@@ -314,6 +417,11 @@
314 "ms": "2.0.0" 417 "ms": "2.0.0"
315 } 418 }
316 }, 419 },
420 + "deepmerge": {
421 + "version": "3.2.0",
422 + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.2.0.tgz",
423 + "integrity": "sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow=="
424 + },
317 "delayed-stream": { 425 "delayed-stream": {
318 "version": "1.0.0", 426 "version": "1.0.0",
319 "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 427 "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
...@@ -329,6 +437,38 @@ ...@@ -329,6 +437,38 @@
329 "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 437 "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
330 "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 438 "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
331 }, 439 },
440 + "dicer": {
441 + "version": "0.2.5",
442 + "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz",
443 + "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=",
444 + "requires": {
445 + "readable-stream": "1.1.x",
446 + "streamsearch": "0.1.2"
447 + },
448 + "dependencies": {
449 + "isarray": {
450 + "version": "0.0.1",
451 + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
452 + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
453 + },
454 + "readable-stream": {
455 + "version": "1.1.14",
456 + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
457 + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
458 + "requires": {
459 + "core-util-is": "~1.0.0",
460 + "inherits": "~2.0.1",
461 + "isarray": "0.0.1",
462 + "string_decoder": "~0.10.x"
463 + }
464 + },
465 + "string_decoder": {
466 + "version": "0.10.31",
467 + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
468 + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
469 + }
470 + }
471 + },
332 "doctypes": { 472 "doctypes": {
333 "version": "1.1.0", 473 "version": "1.1.0",
334 "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", 474 "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz",
...@@ -381,6 +521,41 @@ ...@@ -381,6 +521,41 @@
381 "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", 521 "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
382 "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" 522 "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
383 }, 523 },
524 + "excel4node": {
525 + "version": "1.7.2",
526 + "resolved": "https://registry.npmjs.org/excel4node/-/excel4node-1.7.2.tgz",
527 + "integrity": "sha512-3XSsPSSbUeGloTRQMTmgf4aA1WDGa9fWQitOCGN/URG8NvwPjgVdbyG7FWKukqTdl5XBz9jv0vVBz3BBIo52tg==",
528 + "requires": {
529 + "deepmerge": "3.2.0",
530 + "image-size": "0.7.2",
531 + "jszip": "3.2.1",
532 + "lodash.get": "4.4.2",
533 + "lodash.isequal": "4.5.0",
534 + "lodash.isundefined": "3.0.1",
535 + "lodash.reduce": "4.6.0",
536 + "lodash.uniqueid": "4.0.1",
537 + "mime": "2.4.0",
538 + "uuid": "3.3.2",
539 + "xmlbuilder": "11.0.1"
540 + },
541 + "dependencies": {
542 + "mime": {
543 + "version": "2.4.0",
544 + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz",
545 + "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w=="
546 + },
547 + "xmlbuilder": {
548 + "version": "11.0.1",
549 + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
550 + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="
551 + }
552 + }
553 + },
554 + "exit-on-epipe": {
555 + "version": "1.0.1",
556 + "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz",
557 + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw=="
558 + },
384 "express": { 559 "express": {
385 "version": "4.16.4", 560 "version": "4.16.4",
386 "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", 561 "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
...@@ -519,6 +694,11 @@ ...@@ -519,6 +694,11 @@
519 "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 694 "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
520 "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 695 "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
521 }, 696 },
697 + "frac": {
698 + "version": "1.1.2",
699 + "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
700 + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA=="
701 + },
522 "fresh": { 702 "fresh": {
523 "version": "0.5.2", 703 "version": "0.5.2",
524 "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 704 "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
...@@ -598,6 +778,16 @@ ...@@ -598,6 +778,16 @@
598 "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", 778 "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
599 "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" 779 "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
600 }, 780 },
781 + "image-size": {
782 + "version": "0.7.2",
783 + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.7.2.tgz",
784 + "integrity": "sha512-CBmVIFHyDyiWi1U24eNHl8SH0Iir2IgmEv1RwdRVZxWsEbSCvV5b/eXaYP8epOFv2dbw5uNBOrn1Nc5P5KvsUA=="
785 + },
786 + "immediate": {
787 + "version": "3.0.6",
788 + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
789 + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps="
790 + },
601 "inherits": { 791 "inherits": {
602 "version": "2.0.3", 792 "version": "2.0.3",
603 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 793 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
...@@ -706,11 +896,55 @@ ...@@ -706,11 +896,55 @@
706 "promise": "^7.0.1" 896 "promise": "^7.0.1"
707 } 897 }
708 }, 898 },
899 + "jszip": {
900 + "version": "3.2.1",
901 + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.2.1.tgz",
902 + "integrity": "sha512-iCMBbo4eE5rb1VCpm5qXOAaUiRKRUKiItn8ah2YQQx9qymmSAY98eyQfioChEYcVQLh0zxJ3wS4A0mh90AVPvw==",
903 + "requires": {
904 + "lie": "~3.3.0",
905 + "pako": "~1.0.2",
906 + "readable-stream": "~2.3.6",
907 + "set-immediate-shim": "~1.0.1"
908 + }
909 + },
910 + "lie": {
911 + "version": "3.3.0",
912 + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
913 + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
914 + "requires": {
915 + "immediate": "~3.0.5"
916 + }
917 + },
709 "lodash": { 918 "lodash": {
710 "version": "4.17.15", 919 "version": "4.17.15",
711 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 920 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
712 "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" 921 "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
713 }, 922 },
923 + "lodash.get": {
924 + "version": "4.4.2",
925 + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
926 + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
927 + },
928 + "lodash.isequal": {
929 + "version": "4.5.0",
930 + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
931 + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
932 + },
933 + "lodash.isundefined": {
934 + "version": "3.0.1",
935 + "resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz",
936 + "integrity": "sha1-I+89lTVWUgOmbO/VuDD4SJEa+0g="
937 + },
938 + "lodash.reduce": {
939 + "version": "4.6.0",
940 + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz",
941 + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs="
942 + },
943 + "lodash.uniqueid": {
944 + "version": "4.0.1",
945 + "resolved": "https://registry.npmjs.org/lodash.uniqueid/-/lodash.uniqueid-4.0.1.tgz",
946 + "integrity": "sha1-MmjyanyI5PSxdY1nknGBTjH6WyY="
947 + },
714 "media-typer": { 948 "media-typer": {
715 "version": "0.3.0", 949 "version": "0.3.0",
716 "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 950 "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
...@@ -752,6 +986,19 @@ ...@@ -752,6 +986,19 @@
752 "brace-expansion": "^1.1.7" 986 "brace-expansion": "^1.1.7"
753 } 987 }
754 }, 988 },
989 + "minimist": {
990 + "version": "1.2.5",
991 + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
992 + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
993 + },
994 + "mkdirp": {
995 + "version": "0.5.5",
996 + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
997 + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
998 + "requires": {
999 + "minimist": "^1.2.5"
1000 + }
1001 + },
755 "moment": { 1002 "moment": {
756 "version": "2.26.0", 1003 "version": "2.26.0",
757 "resolved": "https://registry.npmjs.org/moment/-/moment-2.26.0.tgz", 1004 "resolved": "https://registry.npmjs.org/moment/-/moment-2.26.0.tgz",
...@@ -774,6 +1021,21 @@ ...@@ -774,6 +1021,21 @@
774 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1021 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
775 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 1022 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
776 }, 1023 },
1024 + "multer": {
1025 + "version": "1.4.2",
1026 + "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.2.tgz",
1027 + "integrity": "sha512-xY8pX7V+ybyUpbYMxtjM9KAiD9ixtg5/JkeKUTD6xilfDv0vzzOFcCp4Ljb1UU3tSOM3VTZtKo63OmzOrGi3Cg==",
1028 + "requires": {
1029 + "append-field": "^1.0.0",
1030 + "busboy": "^0.2.11",
1031 + "concat-stream": "^1.5.2",
1032 + "mkdirp": "^0.5.1",
1033 + "object-assign": "^4.1.1",
1034 + "on-finished": "^2.3.0",
1035 + "type-is": "^1.6.4",
1036 + "xtend": "^4.0.0"
1037 + }
1038 + },
777 "mysql": { 1039 "mysql": {
778 "version": "2.18.1", 1040 "version": "2.18.1",
779 "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", 1041 "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz",
...@@ -813,6 +1075,11 @@ ...@@ -813,6 +1075,11 @@
813 "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", 1075 "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
814 "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" 1076 "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA=="
815 }, 1077 },
1078 + "pako": {
1079 + "version": "1.0.11",
1080 + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
1081 + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
1082 + },
816 "parseurl": { 1083 "parseurl": {
817 "version": "1.3.3", 1084 "version": "1.3.3",
818 "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 1085 "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
...@@ -852,6 +1119,11 @@ ...@@ -852,6 +1119,11 @@
852 "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 1119 "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
853 "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" 1120 "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
854 }, 1121 },
1122 + "printj": {
1123 + "version": "1.1.2",
1124 + "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz",
1125 + "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ=="
1126 + },
855 "process-nextick-args": { 1127 "process-nextick-args": {
856 "version": "2.0.1", 1128 "version": "2.0.1",
857 "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 1129 "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
...@@ -1122,6 +1394,11 @@ ...@@ -1122,6 +1394,11 @@
1122 "send": "0.16.2" 1394 "send": "0.16.2"
1123 } 1395 }
1124 }, 1396 },
1397 + "set-immediate-shim": {
1398 + "version": "1.0.1",
1399 + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
1400 + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E="
1401 + },
1125 "setprototypeof": { 1402 "setprototypeof": {
1126 "version": "1.1.0", 1403 "version": "1.1.0",
1127 "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", 1404 "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
...@@ -1132,6 +1409,14 @@ ...@@ -1132,6 +1409,14 @@
1132 "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", 1409 "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz",
1133 "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=" 1410 "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A="
1134 }, 1411 },
1412 + "ssf": {
1413 + "version": "0.10.3",
1414 + "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.10.3.tgz",
1415 + "integrity": "sha512-pRuUdW0WwyB2doSqqjWyzwCD6PkfxpHAHdZp39K3dp/Hq7f+xfMwNAWIi16DyrRg4gg9c/RvLYkJTSawTPTm1w==",
1416 + "requires": {
1417 + "frac": "~1.1.2"
1418 + }
1419 + },
1135 "sshpk": { 1420 "sshpk": {
1136 "version": "1.16.1", 1421 "version": "1.16.1",
1137 "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", 1422 "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
...@@ -1153,6 +1438,11 @@ ...@@ -1153,6 +1438,11 @@
1153 "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", 1438 "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
1154 "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" 1439 "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
1155 }, 1440 },
1441 + "streamsearch": {
1442 + "version": "0.1.2",
1443 + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz",
1444 + "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo="
1445 + },
1156 "string_decoder": { 1446 "string_decoder": {
1157 "version": "1.1.1", 1447 "version": "1.1.1",
1158 "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 1448 "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
...@@ -1217,6 +1507,11 @@ ...@@ -1217,6 +1507,11 @@
1217 "mime-types": "~2.1.24" 1507 "mime-types": "~2.1.24"
1218 } 1508 }
1219 }, 1509 },
1510 + "typedarray": {
1511 + "version": "0.0.6",
1512 + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
1513 + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
1514 + },
1220 "uid-safe": { 1515 "uid-safe": {
1221 "version": "2.1.5", 1516 "version": "2.1.5",
1222 "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", 1517 "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
...@@ -1300,6 +1595,26 @@ ...@@ -1300,6 +1595,26 @@
1300 "babel-walk": "3.0.0-canary-5" 1595 "babel-walk": "3.0.0-canary-5"
1301 } 1596 }
1302 }, 1597 },
1598 + "wmf": {
1599 + "version": "1.0.2",
1600 + "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
1601 + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
1602 + },
1603 + "xlsx": {
1604 + "version": "0.16.2",
1605 + "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.16.2.tgz",
1606 + "integrity": "sha512-XTqOy7YpCUtGbvCYaCh1t1RsZ/y8cSCbZCOYtqqZ4/EmHkyv+/ghxmCvvR8yc4Tn5fhny+3j7voKwJaRlffNKA==",
1607 + "requires": {
1608 + "adler-32": "~1.2.0",
1609 + "cfb": "^1.1.4",
1610 + "codepage": "~1.14.0",
1611 + "commander": "~2.17.1",
1612 + "crc-32": "~1.2.0",
1613 + "exit-on-epipe": "~1.0.1",
1614 + "ssf": "~0.10.3",
1615 + "wmf": "~1.0.1"
1616 + }
1617 + },
1303 "xml2js": { 1618 "xml2js": {
1304 "version": "0.4.19", 1619 "version": "0.4.19",
1305 "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", 1620 "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
...@@ -1313,6 +1628,11 @@ ...@@ -1313,6 +1628,11 @@
1313 "version": "9.0.7", 1628 "version": "9.0.7",
1314 "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", 1629 "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
1315 "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" 1630 "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
1631 + },
1632 + "xtend": {
1633 + "version": "4.0.2",
1634 + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
1635 + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
1316 } 1636 }
1317 } 1637 }
1318 } 1638 }
......
...@@ -11,15 +11,18 @@ ...@@ -11,15 +11,18 @@
11 "crypto-js": "^4.0.0", 11 "crypto-js": "^4.0.0",
12 "debug": "~2.6.9", 12 "debug": "~2.6.9",
13 "ejs": "^3.1.3", 13 "ejs": "^3.1.3",
14 + "excel4node": "^1.7.2",
14 "express": "~4.16.1", 15 "express": "~4.16.1",
15 "express-session": "^1.17.1", 16 "express-session": "^1.17.1",
16 "formidable": "^1.2.2", 17 "formidable": "^1.2.2",
17 "http-errors": "~1.6.3", 18 "http-errors": "~1.6.3",
18 "moment": "^2.26.0", 19 "moment": "^2.26.0",
19 "morgan": "~1.9.1", 20 "morgan": "~1.9.1",
21 + "multer": "^1.4.2",
20 "mysql": "^2.18.1", 22 "mysql": "^2.18.1",
21 "passport": "^0.4.1", 23 "passport": "^0.4.1",
22 "pug": "^3.0.0", 24 "pug": "^3.0.0",
23 - "request": "^2.88.2" 25 + "request": "^2.88.2",
26 + "xlsx": "^0.16.2"
24 } 27 }
25 } 28 }
......
1 +var express = require('express');
2 +var router = express.Router();
3 +const XLSX = require('xlsx');
4 +var multer = require('multer');
5 +var fs = require('fs');
6 +var xl = require('excel4node');
7 +// var pool = require('./../routes/modules/database');
8 +
9 +//파일 저장위치와 파일이름 설정
10 +var storage = multer.diskStorage({
11 + destination: function (req, file, cb) {
12 + cb(null, 'public/upload');
13 + },
14 + //파일이름 설정
15 + filename: function (req, file, cb) {
16 + cb(null, file.originalname);
17 + }
18 +})
19 +
20 +//파일 업로드 모듈
21 +var upload = multer({ storage: storage })
22 +
23 +// 연락처 백업, 삭제, 검색
24 +/*
25 +contact_upload : 연락처 파일 업로드 모듈
26 +input : 사용자가 연락처를 저장해놓은 csv 혹은 xlsx 파일
27 +output : 연락처 저장 성공 여부
28 +*/
29 +router.post('/contact_upload', upload.single('file'), function(req, res, next) {
30 + // console.log(req);
31 + var user_id = req.query.id;
32 + var file = req.file;
33 + var workbook = XLSX.readFile('public/upload/contact.xlsx');
34 + var firstWSheetName = workbook.SheetNames[0];
35 + var firstWSheet = workbook.Sheets[firstWSheetName];
36 + var name = [];
37 + var phone = [];
38 + var email = [];
39 + var added_date = [];
40 + var length = firstWSheet['!ref'][4];
41 + var temp ="";
42 +
43 + var sqlquery = "insert into contact(user_id,name,email,phone,added_date) values";
44 + for(var i=1;i<length;i++)
45 + {
46 + for(var j=0;j<4;j++)
47 + {
48 + if(j==0){
49 + temp = "A" + (i+1);
50 + name.push(firstWSheet[temp].v);
51 + sqlquery += ' ("' + user_id + '","'+name[i-1];
52 + }
53 + else if(j==1){
54 + temp = "B" + (i+1);
55 + phone.push(firstWSheet[temp].v);
56 + sqlquery += '","' + phone[i-1];
57 + }
58 + else if(j==2){
59 + temp = "C" + (i+1);
60 + email.push(firstWSheet[temp].v);
61 + sqlquery += '","' + email[i-1];
62 + }
63 + else if(j==3){
64 + temp = "D" + (i+1);
65 + added_date.push(firstWSheet[temp].v);
66 + sqlquery += '",STR_TO_DATE("' + added_date[i-1] + '",' + "'%Y.%m.%d')),";
67 + }
68 +
69 + }
70 + }
71 + sqlquery = sqlquery.substring(0,sqlquery.length-1);
72 + connection.query(sqlquery, function (err, rows) {
73 + if (err) {
74 + console.log("upload contact failed");
75 + throw err;
76 + } else {
77 + console.log(rows);
78 + var filename = 'public/upload/contact.xlsx';
79 + fs.unlink(filename, function (err) {
80 + if (err) throw err;
81 + console.log('file deleted');
82 + })
83 + res.status(200).send('upload');
84 + }
85 + });
86 +});
87 +
88 +/*
89 +contact_download : 연락처 파일 다운로드 모듈
90 +input : 사용자의 연락처 다운로드 요청
91 +output : 연락처 다운로드 성공 여부 및 csv, xlsx 파일
92 +*/
93 +router.post('/contact_download', function(req, res, next) {
94 +
95 + var filename = 'public/upload/contactdownload.xlsx';
96 + fs.exists(filename, function (exists) {
97 + if(exists == true)
98 + {
99 + fs.unlink(filename, function (err) {
100 + if (err) throw err;
101 + });
102 + }
103 + });
104 + // Create a new instance of a Workbook class
105 + var wb = new xl.Workbook();
106 +
107 + // Add Worksheets to the workbook
108 + var ws = wb.addWorksheet('Sheet 1');
109 +
110 + ws.cell(1, 1)
111 + .string('name');
112 + ws.cell(1, 2)
113 + .string('phone');
114 + ws.cell(1, 3)
115 + .string('email');
116 + ws.cell(1, 4)
117 + .string('added_date');
118 +
119 + var user_id = req.query.id;
120 + var sqlquery = "SELECT * FROM contact WHERE user_id = ?";
121 + connection.query(sqlquery, [user_id], function (err, rows) {
122 + if (err) {
123 + console.log("download contact failed");
124 + throw err;
125 + } else {
126 + if(rows.length != 0)
127 + {
128 + for(var i=0;i<rows.length;i++)
129 + {
130 + ws.cell(i+2, 1).string(rows[i].name);
131 + ws.cell(i+2, 2).string(rows[i].phone);
132 + ws.cell(i+2, 3).string(rows[i].email);
133 + ws.cell(i+2, 4).string(rows[i].added_date);
134 + }
135 + }
136 + wb.write('public/upload/contactdownload.xlsx', (err, stats)=> {
137 + if (err){
138 + throw err;
139 + }
140 + else {
141 + res.sendFile(path.join(__dirname, '../public/upload/contactdownload.xlsx'));
142 + }
143 + });
144 + }
145 +
146 + });
147 +});
148 +
149 +/*
150 +contact_create : 연락처 생성 모듈
151 +input : 사용자의 연락처 생성 요청
152 +output : 연락처 생성 성공 여부
153 +사용자한테 연락처 정보 받아오기
154 +*/
155 +router.get('/contact_create', function(req, res, next) {
156 + //insert into contact(name) value ("daso")
157 +});
158 +
159 +/*
160 +contact_delete : 연락처 삭제 모듈
161 +input : 사용자의 연락처 삭제 요청
162 +output : 연락처 삭제 성공 여부
163 +*/
164 +router.post('/contact_delete', function(req, res, next) {
165 + // console.log("req.query",req.query);
166 + var user_id = req.query.id;
167 + var sqlquery = "DELETE FROM contact WHERE user_id = ?";
168 + connection.query(sqlquery, [user_id], function (err, rows) {
169 + if (err) {
170 + console.log("delete contact failed");
171 + throw err;
172 + } else {
173 + // console.log(rows);s
174 + res.status(200).send("delete");
175 + }
176 +
177 + });
178 +});
179 +
180 +/*
181 +contact_search : 연락처 검색 모듈
182 +input : 사용자가 이름, 전화번호, 이메일 중 하나를 검색
183 +output : 검색을 요청한 데이터에 부합하는 연락처를 찾았다면 출력
184 +*/
185 +router.post('/contact_search', function(req, res, next) {
186 + console.log("req.query",req.query);
187 + var user_id = req.query.id;
188 + var type = req.query.type;
189 + var info = "";
190 + if(type == "name")
191 + {
192 + info = req.query.name;
193 + var sqlquery = "SELECT * FROM contact WHERE user_id = ? and name = ?";
194 + }
195 + else if(type == "phone")
196 + {
197 + info = req.query.phone;
198 + var sqlquery = "SELECT * FROM contact WHERE user_id = ? and phone = ?";
199 + }
200 + else if(type == "email")
201 + {
202 + info = req.query.email;
203 + var sqlquery = "SELECT * FROM contact WHERE user_id = ? and email = ?";
204 + }
205 + console.log(sqlquery);
206 + connection.query(sqlquery, [user_id,info], function (err, rows) {
207 + if (err) {
208 + console.log("search contact failed");
209 + throw err;
210 + } else {
211 + console.log(rows);
212 + res.status(200).send({contact_list : rows});
213 + }
214 +
215 + });
216 +});
217 +
218 +/*
219 +contact_list : 연락처 출력 모듈
220 +input : 사용자의 연락처 출력 요청
221 +output : 저장된 연락처 목록 출력
222 +*/
223 +router.post('/contact_list', function(req, res, next) {
224 + console.log("req.query",req.query);
225 + var user_id = req.query.id;
226 + var sqlquery = "SELECT * FROM contact WHERE user_id = ?";
227 + connection.query(sqlquery, [user_id], function (err, rows) {
228 + if (err) {
229 + console.log("select contact failed");
230 + throw err;
231 + } else {
232 + console.log(rows);
233 + res.status(200).send({contact_list : rows});
234 + }
235 +
236 + });
237 +});
238 +
239 +
240 +module.exports = router;