diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 344393e..5b01bad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,44 +1,42 @@ name: GCP CI/CD on: - push: - branches: [ main ] + pull_request: + types: + - closed jobs: - build: + if_merged: runs-on: ubuntu-latest steps: - - name: executing remote ssh commands using ssh key + - if: github.event.pull_request.merged == true && github.head_ref == 'feature/Backend' uses: appleboy/ssh-action@master with: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} key: ${{ secrets.SSH_KEY }} - #passphrase: ${{ secrets.PASSPHRASE }} + passphrase: ${{ secrets.PASSPHRASE }} port: 22 script: | - - cd ${{ secrets.PWD }} - - git pull https://${{ secrets.GIT_TOKEN }}:x-oauth-basic@github.com/2022-Sejong-Creative-Semester/Traffic-Information-Service-for-the-Disabled.git main - - PR_BRANCH="${{ github.head_ref }}" - - #Frontend에서 보낸 PR의 경우 - if [[ $PR_BRANCH == "Frontend"* ]]; then - - cd ${{ secrets.PWD }}/Frontend/creative - - #메모리 오버 방지를 위해 기존 서버 동작 중지 - pm2 stop Traffic - - #의존성 설치 - npm install - - #npm run build 까지 추가로 진행 - npm run build - - cd ${{ secrets.PWD }} - - npm install - - pm2 restart Traffic + cd ${{ secrets.PWD }} + git pull origin main + cd ${{ secrets.PWD }}/BackendJS/BackendTS + npm install + pm2 restart Traffic + - if: github.event.pull_request.merged == true && github.head_ref == 'Frontend' + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.SSH_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + port: 22 + script: | + cd ${{ secrets.PWD }} + git pull origin main + cd ${{ secrets.PWD }}/Backend/Frontend/creative + pm2 stop Traffic + npm install + npm run build + cd ${{ secrets.PWD }}/BackendJS/BackendTS + npm install + pm2 restart Traffic \ No newline at end of file diff --git a/.gitignore b/.gitignore index 984188b..8a195e7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ # ServiceKey /Backend/Key +/Backend/KEY +KEY 창의학기제 창립제 발표자료 - 박상욱.pptx diff --git a/Backend/Frontend/creative/public/image/refresh.png b/Backend/Frontend/creative/public/image/refresh.png deleted file mode 100644 index 675f467..0000000 Binary files a/Backend/Frontend/creative/public/image/refresh.png and /dev/null differ diff --git a/Backend/Frontend/creative/src/component/auth/Api.ts b/Backend/Frontend/creative/src/component/auth/Api.ts index fa25811..d4c1b8b 100644 --- a/Backend/Frontend/creative/src/component/auth/Api.ts +++ b/Backend/Frontend/creative/src/component/auth/Api.ts @@ -1,6 +1,10 @@ import axios from "axios" export const api = axios.create({ +<<<<<<< HEAD baseURL: "http://34.145.39.241:3005" +======= + baseURL: "http://34.168.80.42:3005" +>>>>>>> a4564550bd27da525e96b6fc9b5b02b8210532dc }) diff --git a/Backend/Frontend/creative/src/component/bus-component/buslist/BusList.tsx b/Backend/Frontend/creative/src/component/bus-component/buslist/BusList.tsx index 20c837e..62a3f1c 100644 --- a/Backend/Frontend/creative/src/component/bus-component/buslist/BusList.tsx +++ b/Backend/Frontend/creative/src/component/bus-component/buslist/BusList.tsx @@ -12,8 +12,8 @@ flex-direction:column; align-items: center; box-sizing: border-box; width: 100%; -max-height:40%; -min-height:40%; +max-height:50%; +min-height:50%; padding:0; margin:0; overflow:auto; diff --git a/Backend/Frontend/creative/src/component/header/Header.tsx b/Backend/Frontend/creative/src/component/header/Header.tsx index 8932031..73e96c1 100644 --- a/Backend/Frontend/creative/src/component/header/Header.tsx +++ b/Backend/Frontend/creative/src/component/header/Header.tsx @@ -14,10 +14,16 @@ z-index: 100; justify-content:space-between; background-color: #FFFFFF; align-items:center; +position:fixed; +top: 0; font-family: 'GmarketSansMedium'; border-bottom: 2px solid #EBEBEB; width:100vw; +<<<<<<< HEAD height:10vh; +======= +min-height:8vh; +>>>>>>> a4564550bd27da525e96b6fc9b5b02b8210532dc .header_home{ font-size:5vw; color:#000000; diff --git a/Backend/Frontend/creative/src/component/map/BusMapping.tsx b/Backend/Frontend/creative/src/component/map/BusMapping.tsx index 51d1600..387e29b 100644 --- a/Backend/Frontend/creative/src/component/map/BusMapping.tsx +++ b/Backend/Frontend/creative/src/component/map/BusMapping.tsx @@ -17,6 +17,7 @@ const Mapping = () => { const dispatch = useDispatch() const marker = useSelector((state:RootState) => state.map.marker) const position = useSelector((state:RootState) => state.map.position) +<<<<<<< HEAD:Backend/Frontend/creative/src/component/map/BusMapping.tsx const arsid = useSelector((state:RootState)=> state.bus.currentStation); const busmode = useSelector((state:RootState) => state.map.busmode); const {curPosition} = usePosition(geolocationOptions); @@ -26,6 +27,17 @@ const Mapping = () => { const container = document.getElementById("busmap"); const x = position.tmX!==0?Number(position.tmX):tmX!==0?tmX:37.55068403524657; const y = position.tmY!==0?Number(position.tmY):tmY!==0?tmY:127.07411251036736; +======= + const arsid = useSelector((state:RootState) => state.bus.currentStation) + const busmode = useSelector((state:RootState) => state.map.busmode) + const subwaymode = useSelector((state:RootState) => state.map.subwaymode) + const {curPosition} = usePosition(); + const tmY = curPosition ? curPosition.tmY: position.tmY; + const tmX = curPosition ? curPosition.tmX: position.tmX; + useEffect(() => { + console.log(tmX,tmY); + const container = document.getElementById("map"); +>>>>>>> a4564550bd27da525e96b6fc9b5b02b8210532dc:Backend/Frontend/creative/src/component/map/Mapping.tsx const options = { center: new window.kakao.maps.LatLng(y, x), level: 3, @@ -33,8 +45,24 @@ const Mapping = () => { const map = new window.kakao.maps.Map(container, options); if (busmode) busmapcoordinate(marker, map) +<<<<<<< HEAD:Backend/Frontend/creative/src/component/map/BusMapping.tsx },[tmX,tmY,busmode,arsid,position]) +======= + else if (subwaymode) + subwaymapcoordinate(marker, map) + },[tmX,tmY]) + + const subwaymapcoordinate = (marker:any, map:any) => { + const markerPosition = new window.kakao.maps.LatLng(parseFloat(String(marker.tmY - 0.0000005)).toFixed(6), parseFloat(String(marker.tmX - 0.0000005)).toFixed(6)) + const new_marker = new window.kakao.maps.Marker({ + position: markerPosition, + clickable: true, + }) + new_marker.setMap(map) + } + +>>>>>>> a4564550bd27da525e96b6fc9b5b02b8210532dc:Backend/Frontend/creative/src/component/map/Mapping.tsx const busmapcoordinate = (marker:any, map:any) => { marker.forEach((element:any) => { const imageSrc = './image/busImage.png' // 마커이미지의 주소입니다 diff --git a/Backend/Frontend/creative/src/component/map/SignMapping.tsx b/Backend/Frontend/creative/src/component/map/SignMapping.tsx index c80d8fc..808e8b4 100644 --- a/Backend/Frontend/creative/src/component/map/SignMapping.tsx +++ b/Backend/Frontend/creative/src/component/map/SignMapping.tsx @@ -17,8 +17,8 @@ const Mapping = () => { const [map,setMap] = useState(null); const [start,setStart] = useState(null); const [end,setEnd] = useState(null); + const [prev,setPrev] = useState(start); const position = useSelector((state:RootState) => state.map.position) - const arsid = useSelector((state:RootState)=> state.bus.currentStation); const {curPosition} = usePosition(geolocationOptions); const state = useSelector((state:RootState)=>state.sign.State); const tmY = curPosition ? curPosition.tmY: position.tmY; @@ -43,7 +43,7 @@ const Mapping = () => { Endmarker.setMap(map); setStart(Startmarker) setEnd(Endmarker); - },[tmX,tmY,arsid,position]) + },[tmX,tmY,position]) const moveMarker = (mouseEvent:any) => { let latlng = mouseEvent!.latLng; @@ -63,6 +63,7 @@ const Mapping = () => { } if(map&&state!=="") changeStateMarker(); + return (
diff --git a/Backend/Frontend/creative/src/component/menu/MenuBar.tsx b/Backend/Frontend/creative/src/component/menu/MenuBar.tsx index 6cba031..54a85ff 100644 --- a/Backend/Frontend/creative/src/component/menu/MenuBar.tsx +++ b/Backend/Frontend/creative/src/component/menu/MenuBar.tsx @@ -1,11 +1,16 @@ import React from "react" import styled from "styled-components" +<<<<<<< HEAD import { NavLink } from "react-router-dom"; +======= + +>>>>>>> a4564550bd27da525e96b6fc9b5b02b8210532dc import {ReactComponent as HOME} from "./menuSvg/HOME.svg"; import {ReactComponent as BUS} from "./menuSvg/BUS.svg"; import {ReactComponent as SUBWAY} from "./menuSvg/SUBWAY.svg"; import {ReactComponent as SIGN} from "./menuSvg/SIGN.svg"; +<<<<<<< HEAD const StyleMenuBar = styled.div` display:flex; @@ -42,6 +47,43 @@ const MenuBar = () => { isActive?: )} +======= + + + +const StyleMenuBar = styled.div` +display:flex; +position: fixed; +bottom: 0; +justify-content: space-evenly; +align-items: center; +width: 100%; +height: 8vh; +background-color: #FFD12D; +text-decoration:none; +@media (max-width:500px){ + justify-content: space-evenly; +} +` + +const StyleButton = styled.button` + background-color: transparent; + border: 0; + .menu_img{ + fill: white; + min-height: 4vh; + } +` + + +const MenuBar = () => { + return ( + + + + + +>>>>>>> a4564550bd27da525e96b6fc9b5b02b8210532dc ) } diff --git a/Backend/Frontend/creative/src/component/sign-component/SignDetail.tsx b/Backend/Frontend/creative/src/component/sign-component/SignDetail.tsx index 379e4e8..51fe51b 100644 --- a/Backend/Frontend/creative/src/component/sign-component/SignDetail.tsx +++ b/Backend/Frontend/creative/src/component/sign-component/SignDetail.tsx @@ -11,6 +11,7 @@ const StyledSignDetail = styled.main` flex-direction: column; font-family: "Pretendard-Regular"; font-style: normal; + overflow: auto; .detail{ margin-top: 1.2em; padding-bottom: 1em; @@ -24,9 +25,9 @@ const SignDetail = () => { const arr = useSignForm(); return ( - {arr[0].length!==0&&arr[0].map((ele:any)=>{ + {arr[0].length!==0&&arr[0].map((ele:any,index:number)=>{ return ( -
+
{ele.info.totalTime}분 diff --git a/Backend/Frontend/creative/src/component/sign-component/SignDetailGraph.tsx b/Backend/Frontend/creative/src/component/sign-component/SignDetailGraph.tsx index a8b4751..29d7e23 100644 --- a/Backend/Frontend/creative/src/component/sign-component/SignDetailGraph.tsx +++ b/Backend/Frontend/creative/src/component/sign-component/SignDetailGraph.tsx @@ -2,7 +2,6 @@ import React from "react"; import styled from "styled-components"; - interface graphItem { label:string, portion:number, @@ -39,23 +38,21 @@ const SignDetailGraph = ({graph}:any) => { {graph.subPath.map((ele:any,index:number)=>{ if(ele.sectionTime!==0){ let color="#D9D9D9"; - if(ele.trafficType===1) + if(ele.trafficType===1){ color = idColor[ele.lane[0].subwayCode-1] - else if(ele.trafficType===2) + } + else if(ele.trafficType===2){ color = busColor; - return + } + return ( + {ele.sectionTime}분 + ) } })} ) } -export default SignDetailGraph; - -/* - time:ele.info.totalTime, -type:ele.pathType, - -*/ \ No newline at end of file +export default SignDetailGraph; \ No newline at end of file diff --git a/Backend/Frontend/creative/src/component/sign-component/SignDetailInfo.tsx b/Backend/Frontend/creative/src/component/sign-component/SignDetailInfo.tsx index 8e384de..cc5a01a 100644 --- a/Backend/Frontend/creative/src/component/sign-component/SignDetailInfo.tsx +++ b/Backend/Frontend/creative/src/component/sign-component/SignDetailInfo.tsx @@ -8,9 +8,12 @@ const StyledSignDetailInfo = styled.div` const StyledSignDetailInfoLi = styled.div` display: flex; + flex-direction: column; margin:1em 0; + font-family: "Pretendard-Regular"; + font-style: normal; .SignDetail{ - margin-left: 1em; + margin-top: 1px; } ` @@ -18,11 +21,11 @@ const SignDetailInfo = ({graph}:any) => { return ( - {graph.subPath.map((ele:any)=>{ + {graph.subPath.map((ele:any,index:number)=>{ if(ele.trafficType!==3){ let name = ele.lane[0].busNo?ele.lane[0].busNo:ele.lane[0].name return ( - + {name}
{ele.endName} - diff --git a/Backend/Frontend/creative/src/component/sign-component/signSvg/BUS.svg b/Backend/Frontend/creative/src/component/sign-component/signSvg/BUS.svg new file mode 100644 index 0000000..3866ca4 --- /dev/null +++ b/Backend/Frontend/creative/src/component/sign-component/signSvg/BUS.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Backend/Frontend/creative/src/component/sign-component/signSvg/SUBWAY.svg b/Backend/Frontend/creative/src/component/sign-component/signSvg/SUBWAY.svg new file mode 100644 index 0000000..c2a2ec9 --- /dev/null +++ b/Backend/Frontend/creative/src/component/sign-component/signSvg/SUBWAY.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Backend/Frontend/creative/src/component/subway-component/subwayform/SubwayForm.tsx b/Backend/Frontend/creative/src/component/subway-component/subwayform/SubwayForm.tsx index f2eed9c..7af2ca4 100644 --- a/Backend/Frontend/creative/src/component/subway-component/subwayform/SubwayForm.tsx +++ b/Backend/Frontend/creative/src/component/subway-component/subwayform/SubwayForm.tsx @@ -23,7 +23,7 @@ const SubwayForm = () => { await api.get(`/subway/stNm/${value}`) .then(res => { const { data } = res; - console.log(data) + dispatch(SubwayActions.addSubwayInfo(data)) dispatch(MapActions.Onsubwaymode()) }).catch(error => { diff --git a/Backend/Frontend/creative/src/component/subway-component/subwaylist/SubwayItems.tsx b/Backend/Frontend/creative/src/component/subway-component/subwaylist/SubwayItems.tsx index 2720dc5..bb662a4 100644 --- a/Backend/Frontend/creative/src/component/subway-component/subwaylist/SubwayItems.tsx +++ b/Backend/Frontend/creative/src/component/subway-component/subwaylist/SubwayItems.tsx @@ -25,12 +25,10 @@ const SubwayItems = (props:any) => { const idColor = ["#0052A4", "#00A84D", "#EF7C1C", "#00A5DE", "#996CAC", "#CD7C2F", "#747F00", "#E6186C"]; useEffect(() => { - if (currentSubway === stCd) { + if (currentSubway === stCd) setColor("false") - } - else { + else setColor("true") - } const locationRecive = async () => { await api.get(`/subway/stationInfo/${stCd}/${stNm}`) .then(res => { @@ -42,12 +40,10 @@ const SubwayItems = (props:any) => { }, [currentSubway,stCd,stNm]) const ClickSubway = () => { - if (currentSubway === stCd) { + if (currentSubway === stCd) window.location.href = `/#/subway/detail/${stCd}/${stNm}`; - } else if (currentSubway !== stCd) { setColor("false") - console.log(position) dispatch(MapActions.positioning(position)) dispatch(MapActions.makerchacking(position)) dispatch(SubwayActions.clickSubway(stCd)) diff --git a/Backend/Frontend/creative/src/component/subway-component/subwaylist/SubwayList.tsx b/Backend/Frontend/creative/src/component/subway-component/subwaylist/SubwayList.tsx index 07e9b22..238a560 100644 --- a/Backend/Frontend/creative/src/component/subway-component/subwaylist/SubwayList.tsx +++ b/Backend/Frontend/creative/src/component/subway-component/subwaylist/SubwayList.tsx @@ -11,8 +11,8 @@ flex-direction:column; align-items: center; box-sizing: border-box; width: 100%; -max-height:40%; -min-height:40%; +max-height:50%; +min-height:50%; padding:0; margin:0; overflow:auto; diff --git a/Backend/Frontend/creative/src/hook/useSignForm.tsx b/Backend/Frontend/creative/src/hook/useSignForm.tsx index b773364..491c776 100644 --- a/Backend/Frontend/creative/src/hook/useSignForm.tsx +++ b/Backend/Frontend/creative/src/hook/useSignForm.tsx @@ -10,24 +10,14 @@ const useSignForm = () => { let start = useSelector((state:RootState)=>state.sign.startPostion); let end = useSelector((state:RootState)=>state.sign.endPostion); useEffect(() => { - const getArr = async () => { + const getbusNsub = async () => { await api.get(`/navigation/${start.tmY}/${start.tmX}/${end.tmY}/${end.tmX}/busNsub`) .then(res=>{ - const graphInfo = res.data.map((ele:any)=>{ - return { - time:ele.info.totalTime, - type:ele.pathType, - } - }) - const subwayLi = res.data.filter((ele:any)=>( - ele.pathType===3 - )) - console.log(res.data) - SetSignArr([res.data,subwayLi]) - return res.data + console.log(res.data,"busNsub") + SetSignArr([res.data]) }) } - getArr(); + getbusNsub(); },[start,end]) return signArr; } diff --git a/Backend/Frontend/creative/src/page/MainPage.module.css b/Backend/Frontend/creative/src/page/MainPage.module.css index aad0982..7bb9266 100644 --- a/Backend/Frontend/creative/src/page/MainPage.module.css +++ b/Backend/Frontend/creative/src/page/MainPage.module.css @@ -5,6 +5,7 @@ body { } .bottom { width: 100%; +<<<<<<< HEAD height: 100vh; } @@ -20,6 +21,17 @@ body { flex-direction: column; justify-content: space-evenly; height: 30vh; +======= + height: 100vh; +} + +.main { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100vh; +>>>>>>> a4564550bd27da525e96b6fc9b5b02b8210532dc animation: fadein 2s; -moz-animation: fadein 2s; -webkit-animation: fadein 2s; @@ -36,6 +48,23 @@ body { font-family: 'Pretendard-Regular'; font-size: 1em; } +.main_detail{ + display: flex; + flex-direction: column; + justify-content: space-evenly; + height: 30vh; +} +.main_title{ + font-family: 'GmarketSansMedium'; + font-weight: 700; + font-size: 2em; +} +.main_explan{ + display:flex; + text-align:center; + font-family: 'Pretendard-Regular'; + font-size: 1em; +} @keyframes fadein { from { diff --git a/Backend/routes/busdata.js b/Backend/routes/busdata.js index 9a9cb3f..fb4bb70 100644 --- a/Backend/routes/busdata.js +++ b/Backend/routes/busdata.js @@ -1,7 +1,7 @@ const router = require('express').Router(); const request = require('request'); const convert = require('xml-js'); -const serviceKey = require('../Key/serviceKey.json'); +const serviceKey = require('../KEY/serviceKey.json'); function getStation(stNm, callback) { try { @@ -15,11 +15,17 @@ function getStation(stNm, callback) { url: url + queryParams, method: 'GET' }, function (error, response, body) { + //console.log('Reponse received', body); + const parseJson = convert.xml2json(body); const stationinfo = JSON.parse(parseJson).elements[0].elements[2]; - if (stationinfo.elements == null) { + //이 라인과 아래만 삭제하면 됨 + //console.log(stationinfo); + console.log(stationinfo.elements[0].elements[0]); + + if (stationinfo.elements === undefined) { callback(0); } @@ -77,7 +83,7 @@ function getStationInfo(arsId, callback) { const parseJson = convert.xml2json(body); const stationinfo = JSON.parse(parseJson).elements[0].elements[2]; - //console.log(stationinfo); + console.log(stationinfo.elements[0]); if (stationinfo.elements == null) { callback(0); @@ -201,7 +207,7 @@ router.get('/arsId/:arsId', async (req, res) => { }) } else{ - console.log(new Date()); + //console.log(new Date()); return res.json(stationinfo); } diff --git a/Backend/routes/develop.js b/Backend/routes/develop.js index 10beaae..a585774 100644 --- a/Backend/routes/develop.js +++ b/Backend/routes/develop.js @@ -1,7 +1,7 @@ const router = require('express').Router(); const request = require('request'); const convert = require('xml-js'); -const serviceKey = require('../Key/serviceKey.json'); +const serviceKey = require('../KEY/serviceKey.json'); const SQL_info = require('../KEY/SQL_info.json') const mysql = require('mysql'); @@ -11,6 +11,7 @@ const conn = { port: SQL_info.port, user: SQL_info.user, password: SQL_info.password, + database: SQL_info.database }; diff --git a/Backend/routes/subwaydata.js b/Backend/routes/subwaydata.js index 7c5119f..9473cd3 100644 --- a/Backend/routes/subwaydata.js +++ b/Backend/routes/subwaydata.js @@ -1,4 +1,4 @@ -const serviceKey = require('../Key/serviceKey.json'); +const serviceKey = require('../KEY/serviceKey.json'); const router = require('express').Router(); const db = require('../db'); const request = require('request'); @@ -25,13 +25,14 @@ function getSubwayStationName(stNm, callback){ console.log("StationName"); - let sql = "Select * FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.STIN_NM like ?; "; + let sql = "Select RAIL_OPR_ISTT_CD, LN_CD, STIN_CD, STIN_NM FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.STIN_NM like ?; "; let NameList = []; connection.query(sql, ["%"+stNm+"%"], function (err, results, fields) { if (err) { console.log(err); } + console.log(results); for (let i = 0; i < results.length; i++) { NameList.push({ @@ -93,7 +94,9 @@ function getSubwayStationInfo(stCd, stNm, callback) { method: 'GET' }, function (error, response, body) { + console.log(body); const stationinfo = JSON.parse(body).body[0]; + callback({ railCd: stationinfo.railOprIsttCd, diff --git a/BackendJS/BackendTS/db.js b/BackendJS/BackendTS/db.js new file mode 100644 index 0000000..e0eb70c --- /dev/null +++ b/BackendJS/BackendTS/db.js @@ -0,0 +1,34 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.return_connection = exports.connect = void 0; +const SQL_info_json_1 = __importDefault(require("./KEY/SQL_info.json")); +const mysql_1 = __importDefault(require("mysql")); +var connection; +//인터페이스로 정의 +const conn = { + host: SQL_info_json_1.default.host, + port: SQL_info_json_1.default.port, + user: SQL_info_json_1.default.user, + password: SQL_info_json_1.default.password, + database: SQL_info_json_1.default.database +}; +function connect() { + connection = mysql_1.default.createConnection(conn); // DB Connect + connection.connect(function (err) { + if (err) { + console.error(err); + console.error("MySQL connection err"); + return; + } + console.log("MySQL connected"); + }); + return connection; +} +exports.connect = connect; +function return_connection() { + return connection; +} +exports.return_connection = return_connection; diff --git a/BackendJS/BackendTS/package-lock.json b/BackendJS/BackendTS/package-lock.json new file mode 100644 index 0000000..03047ef --- /dev/null +++ b/BackendJS/BackendTS/package-lock.json @@ -0,0 +1,2038 @@ +{ + "name": "backendts", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "backendts", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "fs": "^0.0.1-security", + "mysql": "^2.18.1", + "path": "^0.12.7", + "request": "^2.88.2", + "xml-js": "^1.6.11" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "engines": { + "node": "*" + } + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "dependencies": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mysql/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz", + "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", + "dependencies": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/util/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + }, + "node_modules/xml-js": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", + "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", + "dependencies": { + "sax": "^1.2.4" + }, + "bin": { + "xml-js": "bin/cli.js" + } + } + }, + "dependencies": { + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==" + }, + "aws4": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + }, + "body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + } + }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "requires": { + "safe-buffer": "5.2.1" + } + }, + "content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" + }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" + }, + "express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "requires": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" + }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" + }, + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==" + }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "requires": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" + }, + "object-inspect": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz", + "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==" + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", + "requires": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, + "psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" + } + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" + }, + "send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "requires": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "dependencies": { + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==" + }, + "sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + } + } + }, + "xml-js": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", + "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", + "requires": { + "sax": "^1.2.4" + } + } + } +} diff --git a/BackendJS/BackendTS/package.json b/BackendJS/BackendTS/package.json new file mode 100644 index 0000000..9dc8a21 --- /dev/null +++ b/BackendJS/BackendTS/package.json @@ -0,0 +1,20 @@ +{ + "name": "backendts", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "fs": "^0.0.1-security", + "mysql": "^2.18.1", + "path": "^0.12.7", + "request": "^2.88.2", + "xml-js": "^1.6.11" + } +} diff --git a/BackendJS/BackendTS/routes/busdata.js b/BackendJS/BackendTS/routes/busdata.js new file mode 100644 index 0000000..dfda4ea --- /dev/null +++ b/BackendJS/BackendTS/routes/busdata.js @@ -0,0 +1,172 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const express_1 = __importDefault(require("express")); +const request_1 = __importDefault(require("request")); +const xml_js_1 = __importDefault(require("xml-js")); +const serviceKey_json_1 = __importDefault(require("../KEY/serviceKey.json")); +const router = express_1.default.Router(); +function getStation(stNm, callback) { + try { + const url = 'http://ws.bus.go.kr/api/rest/stationinfo/getLowStationByName'; + let queryParams = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey_json_1.default.serviceKey; + queryParams += '&' + encodeURIComponent('stSrch') + '=' + encodeURIComponent(stNm); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const parseJson = xml_js_1.default.xml2json(body); + const stationinfo = JSON.parse(parseJson).elements[0].elements[2]; + //빈 배열 선언 + const stationRes = []; + //정류장이 없는 경우 빈 배열 반환 + if (stationinfo.elements === undefined) { + callback(stationRes); + } + else { + const stationlength = stationinfo.elements.length; + for (let i = 0; i < stationlength; i++) { + //arsId가 0인 경우 처리 + const arsId = stationinfo.elements[i].elements[0].elements[0].text; + const stId = stationinfo.elements[i].elements[3].elements[0].text; + const stNm = stationinfo.elements[i].elements[4].elements[0].text; + const tmX = stationinfo.elements[i].elements[5].elements[0].text; + const tmY = stationinfo.elements[i].elements[6].elements[0].text; + stationRes.push({ + arsId: arsId, + stId: stId, + stNm: stNm, + tmX: tmX, + tmY: tmY, + }); + } + callback(stationRes); + } + }); + } + catch (e) { + console.error(e); + } +} +function getStationInfo(arsId, callback) { + try { + const url = 'http://ws.bus.go.kr/api/rest/stationinfo/getLowStationByUid'; + let queryParams = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey_json_1.default.serviceKey; + queryParams += '&' + encodeURIComponent('arsId') + '=' + arsId; + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const parseJson = xml_js_1.default.xml2json(body); + const stationinfo = JSON.parse(parseJson).elements[0].elements[2]; + const busInfo = []; + if (stationinfo.elements === undefined) { + callback(busInfo); + } + else { + const buslength = stationinfo.elements.length; + for (let i = 0; i < buslength; i++) { + const adirection = stationinfo.elements[i].elements[0].elements[0].text; + const arrmsg1 = stationinfo.elements[i].elements[1].elements[0].text; + const busrouteAbrv = stationinfo.elements[i].elements[4].elements[0].text; + const busrouteid = stationinfo.elements[i].elements[5].elements[0].text; + const bustype = stationinfo.elements[i].elements[6].elements[0].text; + const nxtStn = stationinfo.elements[i].elements[22].elements[0].text; + let min = ""; + let sec = ""; + let subtime = arrmsg1; + /* + //[첫차] or [막차] 인 경우 + if (subtime[0] == "[") { + subtime = subtime.substr(6,); + } + */ + //분 없는 경우 + //초 없는 경우 + if (subtime != "운행종료" && subtime != "곧 도착") { + let msgSplit = []; + if (subtime.indexOf("분") !== -1) { + msgSplit = subtime.split("분"); + min = msgSplit[0]; + if (subtime.indexOf("초") !== -1) { + sec = msgSplit[1].split("초")[0]; + } + } + else { + sec = subtime.split("초")[0]; + } + } + busInfo.push({ + busrouteid: busrouteid, + busrouteAbrv: busrouteAbrv, + bustype: bustype, + adirection: adirection, + nxtStn: nxtStn, + arrmsg1: arrmsg1, + min: min, + sec: sec, + }); + } + callback(busInfo); + } + }); + } + catch (e) { + console.error(e); + } +} +//버스 정류장 이름으로 검색하기 +router.get('/stNm/:stNm', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stNm = req.params.stNm; + yield getStation(stNm, station => { + if (station.length === 0) { + return res.status(404).json({ + error: 'No stops with that name' + }); + } + return res.json(station); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +//정류소 아이디로 정보 제공 +router.get('/arsId/:arsId', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + const arsId = req.params.arsId; + try { + yield getStationInfo(arsId, stationinfo => { + if (stationinfo.length === 0) { + return res.status(404).json({ + error: 'No Bus In Station' + }); + } + else + return res.json(stationinfo); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } + ; +})); +module.exports = router; diff --git a/BackendJS/BackendTS/routes/navigation.js b/BackendJS/BackendTS/routes/navigation.js new file mode 100644 index 0000000..45f92ca --- /dev/null +++ b/BackendJS/BackendTS/routes/navigation.js @@ -0,0 +1,503 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const express_1 = __importDefault(require("express")); +const request_1 = __importDefault(require("request")); +const serviceKey_json_1 = __importDefault(require("../KEY/serviceKey.json")); +const router = express_1.default.Router(); +const velocity = 46.8; +function deg2rad(deg) { + return (deg * Math.PI / 180); +} +function rad2deg(rad) { + return (rad * 180 / Math.PI); +} +function distance(lat1, lon1, lat2, lon2) { + if (lat1 === lat2 && lon1 == lon2) { + return 0; + } + else { + let theta = lon1 - lon2; + let dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta)); + dist = Math.acos(dist); + dist = rad2deg(dist); + dist = dist * 60 * 1.1515; + dist = dist * 1.609344; + //dist를 지름으로 한 원 내부의 직각삼각형 두 변의 길이 + return dist * Math.sqrt(2); + } +} +/* + +router.get('/bybus/:startX/:startY/:endX/:endY', async(req:Request, res:Response)=>{ + try{ + + const startX: string = req.params.startX; + const startY: string = req.params.startY; + const endX: string = req.params.endX; + const endY: string = req.params.endY; + + const url:string = "http://ws.bus.go.kr/api/rest/pathinfo/getPathInfoByBus"; + let queryParams:string = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey.serviceKey; + queryParams += '&' + encodeURIComponent('startX') + '=' + startX; + queryParams += '&' + encodeURIComponent('startY') + '=' + startY; + queryParams += '&' + encodeURIComponent('endX') + '=' + endX; + queryParams += '&' + encodeURIComponent('endY') + '=' + endY; + + request({ + url: url + queryParams, + method: 'GET' + }, async function (error:Error, response:any, body:string) { + + const parseJSON:string = convert.xml2json(body); + + const navigationList:any = JSON.parse(parseJSON).elements[0].elements[2].elements; + + const navigationInfo:Array = []; + console.log(parseJSON); + navigationList.forEach((info:any) => { + const tempInfo:NavigationList = { + distance: "", //총 이동 거리 + pathList: [], //이동 경로 + timeList: [], //이동 시간 + totalTime: "", // 총 이동 시간 + walkTime: 0, //총 도보 이동 시간 + }; + tempInfo.distance = info.elements[0].elements[0].text; + tempInfo.totalTime = info.elements[2].elements[0].text; + + //첫 출발지랑 정류장/역 사이 거리 + let x1:number = Number(startX); + let y1:number = Number(startY); + let x2:number = Number(info.elements[1].elements[2].elements[0].text); + let y2:number = Number(info.elements[1].elements[3].elements[0].text); + let dist:number = distance(x1,y1,x2,y2); + + tempInfo.timeList.push(Math.floor(dist/velocity)); + tempInfo.walkTime += Math.floor(dist/velocity); + + for(let i:number=0;i{ + + if( a.pathList.length === b.pathList.length){ + return a.walkTime - b.walkTime; + } + + return a.pathList.length - b.pathList.length + }) + + return res.status(200).json({ + navigationInfo: navigationInfo + }) + + }); + } + catch(e){ + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +}) + +router.get('/bysubway/:startX/:startY/:endX/:endY', async(req:Request,res:Response)=>{ + try{ + + //지하철 환승 이동 시간 필요 + const startX: string = req.params.startX; + const startY: string = req.params.startY; + const endX: string = req.params.endX; + const endY: string = req.params.endY; + + const url:string = "http://ws.bus.go.kr/api/rest/pathinfo/getPathInfoBySubway"; + let queryParams:string = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey.serviceKey; + queryParams += '&' + encodeURIComponent('startX') + '=' + startX; + queryParams += '&' + encodeURIComponent('startY') + '=' + startY; + queryParams += '&' + encodeURIComponent('endX') + '=' + endX; + queryParams += '&' + encodeURIComponent('endY') + '=' + endY; + + request({ + url: url + queryParams, + method: 'GET' + }, async function (error:Error, response:any, body:string) { + + const parseJSON:string = convert.xml2json(body); + + console.log(parseJSON); + + const navigationList:any = JSON.parse(parseJSON).elements[0].elements[2].elements; + + const navigationInfo:Array = []; + navigationList.forEach((info:any) => { + const tempInfo:NavigationList = { + distance: "", //총 이동 거리 + pathList: [], //이동 경로 + timeList: [], //이동 시간 + totalTime: "", // 총 이동 시간 + walkTime: 0, //총 도보 이동 시간 + }; + tempInfo.distance = info.elements[0].elements[0].text; + tempInfo.totalTime = info.elements[2].elements[0].text; + + //첫 출발지랑 정류장/역 사이 거리 + let x1:number = Number(startX); + let y1:number = Number(startY); + let x2:number = Number(info.elements[1].elements[2].elements[0].text); + let y2:number = Number(info.elements[1].elements[3].elements[0].text); + let dist:number = distance(x1,y1,x2,y2); + + tempInfo.timeList.push(Math.floor(dist/velocity)); + tempInfo.walkTime += Math.floor(dist/velocity); + + for(let i:number=0;i = []; + + for(let j:number = 0;j{ + + if( a.pathList.length === b.pathList.length){ + return a.walkTime - b.walkTime; + } + + return a.pathList.length - b.pathList.length + }) + + return res.status(200).json({ + navigationInfo: navigationInfo + }) + + }); + } + catch(e){ + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +}) + +router.get('/bybusNsubway/:startX/:startY/:endX/:endY', async(req:Request,res:Response)=>{ + //버스 -> 지하철 / 지하철 -> 버스로 이동하는 시간 고려 + try{ + + //지하철 환승 이동 시간 필요 + const startX: string = req.params.startX; + const startY: string = req.params.startY; + const endX: string = req.params.endX; + const endY: string = req.params.endY; + + const url:string = "http://ws.bus.go.kr/api/rest/pathinfo/getPathInfoByBusNSub"; + let queryParams:string = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey.serviceKey; + queryParams += '&' + encodeURIComponent('startX') + '=' + startX; + queryParams += '&' + encodeURIComponent('startY') + '=' + startY; + queryParams += '&' + encodeURIComponent('endX') + '=' + endX; + queryParams += '&' + encodeURIComponent('endY') + '=' + endY; + queryParams += '&' + encodeURIComponent('resultType=json'); + + request({ + url: url + queryParams, + method: 'GET' + }, async function (error:Error, response:any, body:string) { + + console.log(body); + const parseJSON:string = convert.xml2json(body); + + //console.log(parseJSON); + + const navigationList:any = JSON.parse(parseJSON).elements[0].elements[2].elements; + + const navigationInfo:Array = []; + navigationList.forEach((info:any) => { + const tempInfo:NavigationList = { + distance: "", //총 이동 거리 + pathList: [], //이동 경로 + timeList: [], //이동 시간 + totalTime: "", // 총 이동 시간 + walkTime: 0, //총 도보 이동 시간 + }; + tempInfo.distance = info.elements[0].elements[0].text; + tempInfo.totalTime = info.elements[2].elements[0].text; + + //첫 출발지랑 정류장/역 사이 거리 + let x1:number = Number(startX); + let y1:number = Number(startY); + let x2:number = Number(info.elements[1].elements[2].elements[0].text); + let y2:number = Number(info.elements[1].elements[3].elements[0].text); + let dist:number = distance(x1,y1,x2,y2); + + tempInfo.timeList.push(Math.floor(dist/velocity)); + tempInfo.walkTime += Math.floor(dist/velocity); + + for(let i:number=0;i{ + + if( a.pathList.length === b.pathList.length){ + return a.walkTime - b.walkTime; + } + + return a.pathList.length - b.pathList.length + }) + + return res.status(200).json({ + navigationInfo: navigationInfo + }) + + }); + } + catch(e){ + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +}) +*/ +router.get('/:startX/:startY/:endX/:endY/:type', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const startX = req.params.startX; + const startY = req.params.startY; + const endX = req.params.endX; + const endY = req.params.endY; + const pathType = (req.params.type === "subway" ? 1 : (req.params.type === "bus" ? 2 : 0)); + const url = 'https://api.odsay.com/v1/api/searchPubTransPathT'; + let queryParams = '?' + encodeURIComponent('lang') + '=' + encodeURIComponent('0'); + queryParams += '&' + encodeURIComponent('SX') + '=' + startX; + queryParams += '&' + encodeURIComponent('SY') + '=' + startY; + queryParams += '&' + encodeURIComponent('EX') + '=' + endX; + queryParams += '&' + encodeURIComponent('EY') + '=' + endY; + queryParams += '&' + encodeURIComponent('apiKey') + '=' + encodeURIComponent(serviceKey_json_1.default.OdsayKey); + queryParams += '&' + encodeURIComponent('SearchPathType') + '=' + pathType; + (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + return __awaiter(this, void 0, void 0, function* () { + if (JSON.parse(body).hasOwnProperty("error")) { + console.error(JSON.parse(body).error); + return res.status(500).json({ + error: JSON.parse(body).error + }); + } + //JSON parse + const NavigationList = JSON.parse(body).result; + //console.log(error); + //console.log(response); + //1. 도보 시간, 2. 환승 개수, 3. 총 이동 시간 + NavigationList.path.sort((a, b) => { + if (a.info.totalWalk === b.info.totalWalk) { + if (a.info.busTransitCount + a.info.subwayTransitCount === b.info.busTransitCount + b.info.subwayTransitCount) { + return a.info.totalTime - b.info.totalTime; + } + else { + return a.info.busTransitCount + a.info.subwayTransitCount - b.info.busTransitCount + b.info.subwayTransitCount; + } + } + else { + return a.info.totalWalk - b.info.totalWalk; + } + }); + //상위 5개 경로만 반환 + NavigationList.path = NavigationList.path.slice(0, 5); + NavigationList.path.forEach(element => { + //일반인 기준 이동시간 저장 + const t = element.info.totalWalkTime; + //도보 이동 시간 계산 + element.info.totalWalkTime = Math.floor((element.info.totalWalk * Math.sqrt(2) / velocity) + 0.9999999999); + //추가 시간 포함 + element.info.totalTime += element.info.totalWalkTime - t; + //info 정리 + delete element.info.trafficDistance; + delete element.info.totalStationCount; + delete element.info.busStationCount; + delete element.info.subwayStationCount; + delete element.info.totalDistance; + delete element.info.checkIntervalTime; + delete element.info.checkIntervalTimeOverYn; + //subPath 정리 + element.subPath.forEach(element => { + //도보인 경우 + if (element.trafficType === 3) { + //교통약자 평균 이동속도에 맞게 이동시간 조정 + element.sectionTime = Math.floor((element.distance * Math.sqrt(2) / velocity) + 0.9999999999); + } + //버스인 경우 + else if (element.trafficType === 2) { + delete element.lane[0].busCityCode; + delete element.lane[0].busProviderCode; + delete element.startStationCityCode; + delete element.startStationProviderCode; + delete element.startID; + delete element.endStationCityCode; + delete element.endStationProviderCode; + delete element.endID; + element.passStopList.stations.forEach(element => { + delete element.stationID; + delete element.stationCityCode; + delete element.stationProviderCode; + delete element.isNonStop; + }); + } + //지하철인 경우 + else if (element.trafficType === 1) { + delete element.lane[0].subwayCityCode; + } + }); + }); + return res.status(200).json(NavigationList.path); + }); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +module.exports = router; diff --git a/BackendJS/BackendTS/routes/subwaydata.js b/BackendJS/BackendTS/routes/subwaydata.js new file mode 100644 index 0000000..1a99c1b --- /dev/null +++ b/BackendJS/BackendTS/routes/subwaydata.js @@ -0,0 +1,654 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const serviceKey_json_1 = __importDefault(require("../KEY/serviceKey.json")); +const express_1 = __importDefault(require("express")); +const request_1 = __importDefault(require("request")); +const db = __importStar(require("../db")); +const router = express_1.default.Router(); +//SubwayStation Name List from DB +function getSubwayStationName(stNm, callback) { + try { + const connection = db.return_connection(); + let SQL = "Select * FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.STIN_NM like ?; "; + let nameList = []; + connection.query(SQL, ["%" + stNm + "%"], function (err, results, fields) { + if (err) { + console.log(err); + } + for (let i = 0; i < results.length; i++) { + nameList.push({ + railCd: results[i].RAIL_OPR_ISTT_CD, + lnCd: results[i].LN_CD, + lnNm: results[i].LN_CD, + stCd: results[i].STIN_CD, + stNm: results[i].STIN_NM, + }); + } + callback(nameList); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getSubwayStationInfo(stCd, stNm, callback) { + try { + const connection = db.return_connection(); + let sql = "Select * FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.stin_cd = ? and a.stin_nm = ?"; + connection.query(sql, [stCd, stNm], function (err, results, fields) { + if (err) { + console.log(err); + } + /* + //NULL error + if (results.length !== 0) { + return callback(); + } + */ + const url = 'https://openapi.kric.go.kr/openapi/convenientInfo/stationInfo'; + let queryParams = '?' + encodeURI('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURI('format') + '=' + encodeURI('json'); + queryParams += '&' + encodeURI('railOprIsttCd'); + queryParams += '=' + encodeURI(results[0].RAIL_OPR_ISTT_CD); + queryParams += '&' + encodeURI('lnCd'); + queryParams += '=' + encodeURI(results[0].LN_CD); + queryParams += '&' + encodeURI('stinCd'); + queryParams += '=' + encodeURI(results[0].STIN_CD); + queryParams += '&' + encodeURI('stinNm'); + queryParams += '=' + encodeURI(results[0].STIN_NM); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const stationinfo = JSON.parse(body).body[0]; + callback({ + railCd: stationinfo.railOprIsttCd, + lnCd: stationinfo.lnCd, + stCd: stationinfo.stinCd, + stNm: stationinfo.stinNm, + roadNm: stationinfo.roadNmAdr, + tmX: stationinfo.stinLocLon, + tmY: stationinfo.stinLocLat, + wNum: results[0].wnum, + eName: results[0].en_name, + fCode: results[0].f_code + }); + }); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getLiftPos(stCd, stNm, railCd, lnCd, callback) { + try { + const url = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/stationWheelchairLiftLocation'; + let queryParams = '?' + encodeURI('serviceKey') + '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURI('format') + '=' + encodeURI('json'); + queryParams += '&' + encodeURI('railOprIsttCd') + '=' + encodeURI(railCd); + queryParams += '&' + encodeURI('lnCd') + '=' + encodeURI(lnCd); + queryParams += '&' + encodeURI('stinCd') + '=' + encodeURI(stCd); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const liftPosInfo = JSON.parse(body).body; + if (liftPosInfo === undefined) { + callback(null); + } + else + callback(liftPosInfo[0]); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getLiftMove(stCd, stNm, railCd, lnCd, callback) { + try { + const liftMoveInfo = []; + const url = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/stationWheelchairLiftMovement'; + let queryParams = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + return __awaiter(this, void 0, void 0, function* () { + //목적지 별로 구분하여 제공 + const liftMoveParse = JSON.parse(body).body; + let liftInfo = { + direction: "", + info: [] + }; + //비동기 처리 + for (let i = 0; i < liftMoveParse.length; i++) { + if (liftMoveParse[i].mvTpOrdr === 1) { + if (liftInfo.info.length !== 0) { + const direction = liftInfo.info[liftInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + liftInfo.direction = direction; + liftMoveInfo.push(liftInfo); + liftInfo.direction = ""; + liftInfo.info = []; + } + } + liftInfo.info.push(liftMoveParse[i]); + } + const direction = liftInfo.info[liftInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + liftInfo.direction = direction; + liftMoveInfo.push(liftInfo); + callback(liftMoveInfo); + }); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getElevatorPos(stCd, stNm, railCd, lnCd, callback) { + try { + const url = 'https://openapi.kric.go.kr/openapi/convenientInfo/stationElevator'; + let queryParams = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const ElevatorPosInfo = JSON.parse(body).body; + callback(ElevatorPosInfo); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getElevatorMove(stCd, stNm, railCd, lnCd, callback) { + try { + const url = 'https://openapi.kric.go.kr/openapi/trafficWeekInfo/stinElevatorMovement'; + let queryParams = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + let elevatorMove = []; + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + let elevatorInfo = { + direction: "", + info: [] + }; + const elevatorMoveParse = JSON.parse(body).body; + for (let i = 0; i < elevatorMoveParse.length; i++) { + if (elevatorMoveParse[i].mvTpOrdr === 1) { + if (elevatorInfo.info.length !== 0) { + const direction = elevatorInfo.info[elevatorInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + elevatorInfo.direction = direction; + elevatorMove.push(elevatorInfo); + elevatorInfo.direction = ""; + elevatorInfo.info = []; + } + } + elevatorInfo.info.push(elevatorMoveParse[i]); + } + const direction = elevatorInfo.info[elevatorInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + elevatorInfo.direction = direction; + elevatorMove.push(elevatorInfo); + callback(elevatorMove); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getTransferList(stCd, stNm, railCd, lnCd, callback) { + try { + const connection = db.return_connection(); + let transferList = { + sourceStation: [], + transferStation: [] + }; + let sql = "Select * FROM subcode_1 WHERE (STIN_CD = ? or STIN_CD = ?) and LN_CD = ? and RAIL_OPR_ISTT_CD = ?;"; + connection.query(sql, [parseInt(stCd) + 1, parseInt(stCd) - 1, lnCd, railCd], function (err, results, fields) { + if (err) { + console.log(err); + } + let sourceStation = []; + /* + if (results.length == 0) { + return callback({ + error: 404, + errorString: "Not Transfer Station" + }); + } + */ + /*else*/ { + for (let i = 0; i < results.length; i++) { + sourceStation.push({ + stCd: results[i].STIN_CD, + stNm: results[i].STIN_NM, + railCd: results[i].RAIL_OPR_ISTT_CD, + lnCd: results[i].LN_CD + }); + } + } + transferList.sourceStation = sourceStation; + }); + sql = "Select * FROM subcode_1 WHERE STIN_NM = ?;"; + connection.query(sql, [stNm], function (err, results, fields) { + if (err) { + console.log(err); + } + if (results.length === 1) { + /* + return callback({ + error: 404, + errorString: "Not Transfer Station" + }); + */ + } + for (let i = 0; i < results.length; i++) { + if (results[i].STIN_CD != stCd) { + const sql2 = "Select * FROM subcode_1 WHERE (STIN_CD = ? or STIN_CD = ?) and RAIL_OPR_ISTT_CD = ?;"; + connection.query(sql2, [parseInt(results[i].STIN_CD) + 1, parseInt(results[i].STIN_CD) - 1, results[i].RAIL_OPR_ISTT_CD], function (err, results2, fields) { + let transferStation = []; + for (let j = 0; j < results2.length; j++) { + transferStation.push({ + stCd: results2[j].STIN_CD, + stNm: results2[j].STIN_NM, + railCd: results2[j].RAIL_OPR_ISTT_CD, + lnCd: results2[j].LN_CD + }); + } + transferList.transferStation = transferStation; + callback(transferList); + }); + } + } + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getTransferInfo(stCd, stNm, railCd, lnCd, prev, chthTgtLn, chtnNextStinCd, callback) { + try { + const connection = db.return_connection(); + let sql = "Select * FROM subcode_1 WHERE STIN_NM = ? and LN_CD = ?;"; + let transferInfo = []; + connection.query(sql, [stNm, chthTgtLn], function (err, results, fields) { + if (err) { + console.log(err); + } + let prevStinCd; + if (parseInt(results[0].STIN_CD) + 1 === parseInt(chtnNextStinCd)) { + prevStinCd = parseInt(results[0].STIN_CD) - 1; + } + else { + prevStinCd = parseInt(results[0].STIN_CD) + 1; + } + const url = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/transferMovement'; + let queryParams = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + queryParams += '&' + encodeURIComponent('prevStinCd') + '=' + encodeURIComponent(prevStinCd); + queryParams += '&' + encodeURIComponent('chthTgtLn') + '=' + encodeURIComponent(chthTgtLn); + queryParams += '&' + encodeURIComponent('chtnNextStinCd') + '=' + encodeURIComponent(chtnNextStinCd); + //chtnNextStinCd -> 상행선 1,3 + //chtnNextStinCd -> 하행선 2,4 + //parse Int 어캐해야됨 + //상행 하행 구분 어캐해야됨 + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const parse = JSON.parse(body).body; + for (let i = 0; i < parse.length; i++) { + //성수가 211 하행 + //railCd로 비교 + //2호선의 경우 상 하행이 반대 + if (railCd === "S1" && lnCd === "2") { + //환승역 방면이 상행선이라면 2, 4만 나옴 + if (prevStinCd > parseInt(chtnNextStinCd)) { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === 2) { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === 1) { + transferInfo.push(parse[i]); + } + } + //하행선인 경우 + else { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === 4) { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === 3) { + transferInfo.push(parse[i]); + } + } + } + else { + //환승역 방면이 상행선이라면 1,3만 나옴 + if (prevStinCd > parseInt(chtnNextStinCd)) { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === 1) { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === 3) { + transferInfo.push(parse[i]); + } + } + //하행선인 경우 + else { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === 2) { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === 4) { + transferInfo.push(parse[i]); + } + } + } + } + callback(transferInfo); + }); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getConvenience(stCd, stNm, railCd, lnCd, callback) { + try { + const conveneinceInfo = []; + const url = 'https://openapi.kric.go.kr/openapi/handicapped/stationCnvFacl'; + let queryParams = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const parse = JSON.parse(body).body; + for (let i = 0; i < parse.length; i++) { + if (parse[i].gubun === "EV" || parse[i].gubun === "WCLF") { + conveneinceInfo.push(parse[i]); + } + } + callback(conveneinceInfo); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +router.get('/stNm/:stNm', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stNm = req.params.stNm; + yield getSubwayStationName(stNm, stationList => { + if (stationList.length === 0) { + return res.status(500).json({ + error: "No Station" + }); + } + else { + return res.status(200).json(stationList); + } + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/stationInfo/:stCd/:stNm', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + yield getSubwayStationInfo(stCd, stNm, stationinfo => { + return res.status(200).json({ + stationinfo + }); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/liftPos/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getLiftPos(stCd, stNm, railCd, lnCd, liftPosInfo => { + //null인 경우 + if (liftPosInfo === null) { + return res.status(200).json([]); + } + else { + return res.status(200).json({ + "railOprIsttCd": liftPosInfo.railOprIsttCd, + "lnCd": liftPosInfo.lnCd, + "stinCd": liftPosInfo.stinCd, + "exitNo": liftPosInfo.exitNo, + "dtlLoc": liftPosInfo.dtlLoc, + "grndDvNmFr": liftPosInfo.grndDvNmFr, + "runStinFlorFr": liftPosInfo.runStinFlorFr, + "grndDvNmTo": liftPosInfo.grndDvNmTo, + "runStinFlorTo": liftPosInfo.runStinFlorTo, + "len": liftPosInfo.len, + "wd": liftPosInfo.wd, + "bndWgt": liftPosInfo.bndWgt + }); + } + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/liftMove/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getLiftMove(stCd, stNm, railCd, lnCd, callback => { + return res.status(200).json(callback); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/ElevatorPos/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getElevatorPos(stCd, stNm, railCd, lnCd, callback => { + return res.status(200).json(callback); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/ElevatorMove/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getElevatorMove(stCd, stNm, railCd, lnCd, callback => { + return res.status(200).json(callback); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/transferMove/transferList/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getTransferList(stCd, stNm, railCd, lnCd, transferInfo => { + if (transferInfo.sourceStation.length === 0 || transferInfo.transferStation.length === 0) { + return res.status(500).json({ + error: 404, + errorString: "Not Transfer Station" + }); + } + return res.status(200).json(transferInfo); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/transferMove/transferInfo/:stCd/:stNm/:railCd/:lnCd/:prevStinCd/:chthTgtLn/:chtnNextStinCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + const prevStinCd = req.params.prevStinCd; + const chthTgtLn = req.params.chthTgtLn; + const chtnNextStinCd = req.params.chtnNextStinCd; + yield getTransferInfo(stCd, stNm, railCd, lnCd, prevStinCd, chthTgtLn, chtnNextStinCd, callback => { + return res.json(callback); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/convenience/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getConvenience(stCd, stNm, railCd, lnCd, conveneinceInfo => { + //No Data + if (conveneinceInfo.length === 0) { + return res.status(500).json({ + error: 404, + errorString: "No conveneince" + }); + } + else { + return res.status(200).json(conveneinceInfo); + } + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +module.exports = router; diff --git a/BackendJS/BackendTS/server.js b/BackendJS/BackendTS/server.js new file mode 100644 index 0000000..0f97062 --- /dev/null +++ b/BackendJS/BackendTS/server.js @@ -0,0 +1,63 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const express_1 = __importDefault(require("express")); +const app = (0, express_1.default)(); +const port = 3005; +const path_1 = __importDefault(require("path")); +const cors_1 = __importDefault(require("cors")); +const db = __importStar(require("./db")); +db.connect(); +const busdata_1 = __importDefault(require("./routes/busdata")); +const subwaydata_1 = __importDefault(require("./routes/subwaydata")); +const navigation_1 = __importDefault(require("./routes/navigation")); +let corsOptions = { + origin: ['http://localhost:3000/#/', 'http://localhost:3000', 'http://localhost:3005', 'http://34.168.80.42:3000', 'http://172.30.1.35:5000', 'http://localhost:5000'], + credentials: true +}; +app.use((0, cors_1.default)(corsOptions)); +app.use(express_1.default.static(path_1.default.join(__dirname, '../../Backend/Frontend/creative/build'))); +app.use('/bus', busdata_1.default); +app.use('/subway', subwaydata_1.default); +app.use('/navigation', navigation_1.default); +app.get('/', (req, res) => { + res.sendFile(path_1.default.join(__dirname, '../../Backend/Frontend/creative/build/index.html')); +}); +app.get('/', (req, res) => { + res.json({ + success: true, + }); +}); +app.listen(port, () => { + console.log(`server is listening at localhost:${port}`); +}); +//10분 주기로 MySQL Connection 유지용 쿼리 보내기 +const mysql_Connect_Maintenance = setInterval(() => { + const connection = db.return_connection(); + connection.query("SELECT 1"); +}, 360000); //10분 diff --git a/BackendJS/db.js b/BackendJS/db.js new file mode 100644 index 0000000..e0eb70c --- /dev/null +++ b/BackendJS/db.js @@ -0,0 +1,34 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.return_connection = exports.connect = void 0; +const SQL_info_json_1 = __importDefault(require("./KEY/SQL_info.json")); +const mysql_1 = __importDefault(require("mysql")); +var connection; +//인터페이스로 정의 +const conn = { + host: SQL_info_json_1.default.host, + port: SQL_info_json_1.default.port, + user: SQL_info_json_1.default.user, + password: SQL_info_json_1.default.password, + database: SQL_info_json_1.default.database +}; +function connect() { + connection = mysql_1.default.createConnection(conn); // DB Connect + connection.connect(function (err) { + if (err) { + console.error(err); + console.error("MySQL connection err"); + return; + } + console.log("MySQL connected"); + }); + return connection; +} +exports.connect = connect; +function return_connection() { + return connection; +} +exports.return_connection = return_connection; diff --git a/BackendJS/interfaces/Bus/bus.interface.js b/BackendJS/interfaces/Bus/bus.interface.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/BackendJS/interfaces/Bus/bus.interface.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/BackendJS/interfaces/Navigation/navigation.interface.js b/BackendJS/interfaces/Navigation/navigation.interface.js new file mode 100644 index 0000000..3fb8384 --- /dev/null +++ b/BackendJS/interfaces/Navigation/navigation.interface.js @@ -0,0 +1,35 @@ +"use strict"; +/*export interface BusPathList { + fid: string, + fname: string, + fx: string, + fy: string, + routeId?: string, + routeNm: string, + tid: string, + tname: string, + tx: string, + ty: string, +} + +export interface SubwayPathList { + routeNm: string, //호선 + fid: string, + fname: string, + fx: string, + fy: string, + tid: string, + tname: string, + tx: string, + ty: string, + railLinkList?: Array, +} + +export interface NavigationList { + distance: string, + pathList: Array|Array, + timeList: Array, + totalTime: string, + walkTime: number +}*/ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/BackendJS/interfaces/Subway/subway.interface.js b/BackendJS/interfaces/Subway/subway.interface.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/BackendJS/interfaces/Subway/subway.interface.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/BackendJS/routes/busdata.js b/BackendJS/routes/busdata.js new file mode 100644 index 0000000..881ebaa --- /dev/null +++ b/BackendJS/routes/busdata.js @@ -0,0 +1,172 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const express_1 = __importDefault(require("express")); +const request_1 = __importDefault(require("request")); +const xml_js_1 = __importDefault(require("xml-js")); +const serviceKey_json_1 = __importDefault(require("../Key/serviceKey.json")); +const router = express_1.default.Router(); +function getStation(stNm, callback) { + try { + const url = 'http://ws.bus.go.kr/api/rest/stationinfo/getLowStationByName'; + let queryParams = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey_json_1.default.serviceKey; + queryParams += '&' + encodeURIComponent('stSrch') + '=' + encodeURIComponent(stNm); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const parseJson = xml_js_1.default.xml2json(body); + const stationinfo = JSON.parse(parseJson).elements[0].elements[2]; + //빈 배열 선언 + const stationRes = []; + //정류장이 없는 경우 빈 배열 반환 + if (stationinfo.elements === undefined) { + callback(stationRes); + } + else { + const stationlength = stationinfo.elements.length; + for (let i = 0; i < stationlength; i++) { + //arsId가 0인 경우 처리 + const arsId = stationinfo.elements[i].elements[0].elements[0].text; + const stId = stationinfo.elements[i].elements[3].elements[0].text; + const stNm = stationinfo.elements[i].elements[4].elements[0].text; + const tmX = stationinfo.elements[i].elements[5].elements[0].text; + const tmY = stationinfo.elements[i].elements[6].elements[0].text; + stationRes.push({ + arsId: arsId, + stId: stId, + stNm: stNm, + tmX: tmX, + tmY: tmY, + }); + } + callback(stationRes); + } + }); + } + catch (e) { + console.error(e); + } +} +function getStationInfo(arsId, callback) { + try { + const url = 'http://ws.bus.go.kr/api/rest/stationinfo/getLowStationByUid'; + let queryParams = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey_json_1.default.serviceKey; + queryParams += '&' + encodeURIComponent('arsId') + '=' + arsId; + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const parseJson = xml_js_1.default.xml2json(body); + const stationinfo = JSON.parse(parseJson).elements[0].elements[2]; + const busInfo = []; + if (stationinfo.elements === undefined) { + callback(busInfo); + } + else { + const buslength = stationinfo.elements.length; + for (let i = 0; i < buslength; i++) { + const adirection = stationinfo.elements[i].elements[0].elements[0].text; + const arrmsg1 = stationinfo.elements[i].elements[1].elements[0].text; + const busrouteAbrv = stationinfo.elements[i].elements[4].elements[0].text; + const busrouteid = stationinfo.elements[i].elements[5].elements[0].text; + const bustype = stationinfo.elements[i].elements[6].elements[0].text; + const nxtStn = stationinfo.elements[i].elements[22].elements[0].text; + let min = ""; + let sec = ""; + let subtime = arrmsg1; + /* + //[첫차] or [막차] 인 경우 + if (subtime[0] == "[") { + subtime = subtime.substr(6,); + } + */ + //분 없는 경우 + //초 없는 경우 + if (subtime != "운행종료" && subtime != "곧 도착") { + let msgSplit = []; + if (subtime.indexOf("분") !== -1) { + msgSplit = subtime.split("분"); + min = msgSplit[0]; + if (subtime.indexOf("초") !== -1) { + sec = msgSplit[1].split("초")[0]; + } + } + else { + sec = subtime.split("초")[0]; + } + } + busInfo.push({ + busrouteid: busrouteid, + busrouteAbrv: busrouteAbrv, + bustype: bustype, + adirection: adirection, + nxtStn: nxtStn, + arrmsg1: arrmsg1, + min: min, + sec: sec, + }); + } + callback(busInfo); + } + }); + } + catch (e) { + console.error(e); + } +} +//버스 정류장 이름으로 검색하기 +router.get('/stNm/:stNm', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stNm = req.params.stNm; + yield getStation(stNm, station => { + if (station.length === 0) { + return res.status(404).json({ + error: 'No stops with that name' + }); + } + return res.json(station); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +//정류소 아이디로 정보 제공 +router.get('/arsId/:arsId', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + const arsId = req.params.arsId; + try { + yield getStationInfo(arsId, stationinfo => { + if (stationinfo.length === 0) { + return res.status(404).json({ + error: 'No Bus In Station' + }); + } + else + return res.json(stationinfo); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } + ; +})); +module.exports = router; diff --git a/BackendJS/routes/subwaydata.js b/BackendJS/routes/subwaydata.js new file mode 100644 index 0000000..edf6de4 --- /dev/null +++ b/BackendJS/routes/subwaydata.js @@ -0,0 +1,662 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const serviceKey_json_1 = __importDefault(require("../Key/serviceKey.json")); +const express_1 = __importDefault(require("express")); +const request_1 = __importDefault(require("request")); +const db = __importStar(require("../db")); +const router = express_1.default.Router(); +//SubwayStation Name List from DB +function getSubwayStationName(stNm, callback) { + try { + const connection = db.return_connection(); + let SQL = "Select * FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.STIN_NM like ?; "; + let nameList = []; + connection.query(SQL, ["%" + stNm + "%"], function (err, results, fields) { + if (err) { + console.log(err); + } + for (let i = 0; i < results.length; i++) { + nameList.push({ + railCd: results[i].RAIL_OPR_ISTT_CD, + lnCd: results[i].LN_CD, + lnNm: results[i].LN_CD, + stCd: results[i].STIN_CD, + stNm: results[i].STIN_NM, + }); + } + callback(nameList); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getSubwayStationInfo(stCd, stNm, callback) { + try { + const connection = db.return_connection(); + let sql = "Select * FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.stin_cd = ? and a.stin_nm = ?"; + connection.query(sql, [stCd, stNm], function (err, results, fields) { + if (err) { + console.log(err); + } + /* + //NULL error + if (results.length !== 0) { + return callback(); + } + */ + const url = 'https://openapi.kric.go.kr/openapi/convenientInfo/stationInfo'; + let queryParams = '?' + encodeURI('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURI('format') + '=' + encodeURI('json'); + queryParams += '&' + encodeURI('railOprIsttCd'); + queryParams += '=' + encodeURI(results[0].RAIL_OPR_ISTT_CD); + queryParams += '&' + encodeURI('lnCd'); + queryParams += '=' + encodeURI(results[0].LN_CD); + queryParams += '&' + encodeURI('stinCd'); + queryParams += '=' + encodeURI(results[0].STIN_CD); + queryParams += '&' + encodeURI('stinNm'); + queryParams += '=' + encodeURI(results[0].STIN_NM); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const stationinfo = JSON.parse(body).body[0]; + callback({ + railCd: stationinfo.railOprIsttCd, + lnCd: stationinfo.lnCd, + stCd: stationinfo.stinCd, + stNm: stationinfo.stinNm, + roadNm: stationinfo.roadNmAdr, + tmX: stationinfo.stinLocLon, + tmY: stationinfo.stinLocLat, + wNum: results[0].wnum, + eName: results[0].en_name, + fCode: results[0].f_code + }); + }); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getLiftPos(stCd, stNm, railCd, lnCd, callback) { + try { + const url = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/stationWheelchairLiftLocation'; + let queryParams = '?' + encodeURI('serviceKey') + '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURI('format') + '=' + encodeURI('json'); + queryParams += '&' + encodeURI('railOprIsttCd') + '=' + encodeURI(railCd); + queryParams += '&' + encodeURI('lnCd') + '=' + encodeURI(lnCd); + queryParams += '&' + encodeURI('stinCd') + '=' + encodeURI(stCd); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const liftPosInfo = JSON.parse(body).body; + callback(liftPosInfo[0]); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getLiftMove(stCd, stNm, railCd, lnCd, callback) { + try { + const liftMoveInfo = []; + const url = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/stationWheelchairLiftMovement'; + let queryParams = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + //목적지 별로 구분하여 제공 + const liftMoveParse = JSON.parse(body).body; + let liftInfo = { + direction: "", + info: [] + }; + for (let i = 0; i < liftMoveParse.length; i++) { + if (liftMoveParse[i].mvTpOrdr === "1") { + if (liftInfo.info.length !== 0) { + const direction = liftInfo.info[liftInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + liftInfo.direction = direction; + liftMoveInfo.push(liftInfo); + liftInfo.direction = ""; + liftInfo.info = []; + } + } + liftInfo.info.push(liftMoveParse[i]); + } + if (liftInfo.info.length !== 0) { + const direction = liftInfo.info[liftInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + liftInfo.direction = direction; + liftMoveInfo.push(liftInfo); + liftInfo.direction = ""; + liftInfo.info = []; + } + callback(liftMoveInfo); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getElevatorPos(stCd, stNm, railCd, lnCd, callback) { + try { + const url = 'https://openapi.kric.go.kr/openapi/convenientInfo/stationElevator'; + let queryParams = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const ElevatorPosInfo = JSON.parse(body).body; + callback(ElevatorPosInfo); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getElevatorMove(stCd, stNm, railCd, lnCd, callback) { + try { + const url = 'https://openapi.kric.go.kr/openapi/trafficWeekInfo/stinElevatorMovement'; + let queryParams = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + let elevatorMove = []; + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + let elevatorInfo = { + direction: "", + info: [] + }; + const elevatorMoveParse = JSON.parse(body).body; + for (let i = 0; i < elevatorMoveParse.length; i++) { + if (elevatorMoveParse[i].mvTpOrdr === "1") { + if (elevatorInfo.info.length != 0) { + const direction = elevatorInfo.info[elevatorInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + elevatorInfo.direction = direction; + elevatorMove.push(elevatorInfo); + elevatorInfo.direction = ""; + elevatorInfo.info = []; + } + } + elevatorInfo.info.push(elevatorMoveParse[i]); + } + if (elevatorInfo.info.length != 0) { + const direction = elevatorInfo.info[elevatorInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + elevatorInfo.direction = direction; + elevatorMove.push(elevatorInfo); + elevatorInfo.direction = ""; + elevatorInfo.info = []; + } + callback(elevatorMove); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getTransferList(stCd, stNm, railCd, lnCd, callback) { + try { + const connection = db.return_connection(); + let transferList = { + sourceStation: [], + transferStation: [] + }; + let sql = "Select * FROM subcode_1 WHERE (STIN_CD = ? or STIN_CD = ?) and LN_CD = ? and RAIL_OPR_ISTT_CD = ?;"; + connection.query(sql, [parseInt(stCd) + 1, parseInt(stCd) - 1, lnCd, railCd], function (err, results, fields) { + if (err) { + console.log(err); + } + let sourceStation = []; + /* + if (results.length == 0) { + return callback({ + error: 404, + errorString: "Not Transfer Station" + }); + } + */ + /*else*/ { + for (let i = 0; i < results.length; i++) { + sourceStation.push({ + stCd: results[i].STIN_CD, + stNm: results[i].STIN_NM, + railCd: results[i].RAIL_OPR_ISTT_CD, + lnCd: results[i].LN_CD + }); + } + } + transferList.sourceStation = sourceStation; + }); + sql = "Select * FROM subcode_1 WHERE STIN_NM = ?;"; + connection.query(sql, [stNm], function (err, results, fields) { + if (err) { + console.log(err); + } + if (results.length === 1) { + /* + return callback({ + error: 404, + errorString: "Not Transfer Station" + }); + */ + } + for (let i = 0; i < results.length; i++) { + if (results[i].STIN_CD != stCd) { + const sql2 = "Select * FROM subcode_1 WHERE (STIN_CD = ? or STIN_CD = ?) and RAIL_OPR_ISTT_CD = ?;"; + connection.query(sql2, [parseInt(results[i].STIN_CD) + 1, parseInt(results[i].STIN_CD) - 1, results[i].RAIL_OPR_ISTT_CD], function (err, results2, fields) { + let transferStation = []; + for (let j = 0; j < results2.length; j++) { + transferStation.push({ + stCd: results2[j].STIN_CD, + stNm: results2[j].STIN_NM, + railCd: results2[j].RAIL_OPR_ISTT_CD, + lnCd: results2[j].LN_CD + }); + } + transferList.transferStation = transferStation; + callback(transferList); + }); + } + } + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getTransferInfo(stCd, stNm, railCd, lnCd, prev, chthTgtLn, chtnNextStinCd, callback) { + try { + const connection = db.return_connection(); + let sql = "Select * FROM subcode_1 WHERE STIN_NM = ? and LN_CD = ?;"; + let transferInfo = []; + connection.query(sql, [stNm, chthTgtLn], function (err, results, fields) { + if (err) { + console.log(err); + } + let prevStinCd; + if (parseInt(results[0].STIN_CD) + 1 === parseInt(chtnNextStinCd)) { + prevStinCd = parseInt(results[0].STIN_CD) - 1; + } + else { + prevStinCd = parseInt(results[0].STIN_CD) + 1; + } + const url = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/transferMovement'; + let queryParams = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + queryParams += '&' + encodeURIComponent('prevStinCd') + '=' + encodeURIComponent(prevStinCd); + queryParams += '&' + encodeURIComponent('chthTgtLn') + '=' + encodeURIComponent(chthTgtLn); + queryParams += '&' + encodeURIComponent('chtnNextStinCd') + '=' + encodeURIComponent(chtnNextStinCd); + //chtnNextStinCd -> 상행선 1,3 + //chtnNextStinCd -> 하행선 2,4 + //parse Int 어캐해야됨 + //상행 하행 구분 어캐해야됨 + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const parse = JSON.parse(body).body; + for (let i = 0; i < parse.length; i++) { + //성수가 211 하행 + //railCd로 비교 + //2호선의 경우 상 하행이 반대 + if (railCd === "S1" && lnCd === "2") { + //환승역 방면이 상행선이라면 2, 4만 나옴 + if (prevStinCd > parseInt(chtnNextStinCd)) { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === "2") { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === "1") { + transferInfo.push(parse[i]); + } + } + //하행선인 경우 + else { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === "4") { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === "3") { + transferInfo.push(parse[i]); + } + } + } + else { + //환승역 방면이 상행선이라면 1,3만 나옴 + if (prevStinCd > parseInt(chtnNextStinCd)) { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === "1") { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === "3") { + transferInfo.push(parse[i]); + } + } + //하행선인 경우 + else { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === "2") { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === "4") { + transferInfo.push(parse[i]); + } + } + } + } + callback(transferInfo); + }); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +function getConvenience(stCd, stNm, railCd, lnCd, callback) { + try { + const conveneinceInfo = []; + const url = 'https://openapi.kric.go.kr/openapi/handicapped/stationCnvFacl'; + let queryParams = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey_json_1.default.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + return (0, request_1.default)({ + url: url + queryParams, + method: 'GET' + }, function (error, response, body) { + const parse = JSON.parse(body).body; + for (let i = 0; i < parse.length; i++) { + if (parse[i].gubun === "EV" || parse[i].gubun === "WCLF") { + conveneinceInfo.push(parse[i]); + } + } + callback(conveneinceInfo); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} +router.get('/stNm/:stNm', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stNm = req.params.stNm; + yield getSubwayStationName(stNm, stationList => { + if (stationList.length === 0) { + return res.status(500).json({ + error: "No Station" + }); + } + else { + return res.status(200).json(stationList); + } + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/stationInfo/:stCd/:stNm', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + yield getSubwayStationInfo(stCd, stNm, stationinfo => { + return res.status(200).json({ + stationinfo + }); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/liftPos/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getLiftPos(stCd, stNm, railCd, lnCd, liftPosInfo => { + return res.status(200).json({ + "railOprIsttCd": liftPosInfo.railOprIsttCd, + "lnCd": liftPosInfo.lnCd, + "stinCd": liftPosInfo.stinCd, + "exitNo": liftPosInfo.exitNo, + "dtlLoc": liftPosInfo.dtlLoc, + "grndDvNmFr": liftPosInfo.grndDvNmFr, + "runStinFlorFr": liftPosInfo.runStinFlorFr, + "grndDvNmTo": liftPosInfo.grndDvNmTo, + "runStinFlorTo": liftPosInfo.runStinFlorTo, + "len": liftPosInfo.len, + "wd": liftPosInfo.wd, + "bndWgt": liftPosInfo.bndWgt + }); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/liftMove/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + console.log("liftMove"); + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getLiftMove(stCd, stNm, railCd, lnCd, callback => { + return res.status(200).json(callback); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/ElevatorPos/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getElevatorPos(stCd, stNm, railCd, lnCd, callback => { + return res.status(200).json(callback); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/ElevatorMove/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getElevatorMove(stCd, stNm, railCd, lnCd, callback => { + return res.status(200).json(callback); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/transferMove/transferList/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getTransferList(stCd, stNm, railCd, lnCd, transferInfo => { + if (transferInfo.sourceStation.length === 0 || transferInfo.transferStation.length === 0) { + return res.status(500).json({ + error: 404, + errorString: "Not Transfer Station" + }); + } + return res.status(200).json(transferInfo); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/transferMove/transferInfo/:stCd/:stNm/:railCd/:lnCd/:prevStinCd/:chthTgtLn/:chtnNextStinCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + const prevStinCd = req.params.prevStinCd; + const chthTgtLn = req.params.chthTgtLn; + const chtnNextStinCd = req.params.chtnNextStinCd; + yield getTransferInfo(stCd, stNm, railCd, lnCd, prevStinCd, chthTgtLn, chtnNextStinCd, callback => { + return res.json(callback); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/convenience/:stCd/:stNm/:railCd/:lnCd', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + yield getConvenience(stCd, stNm, railCd, lnCd, conveneinceInfo => { + //No Data + if (conveneinceInfo.length === 0) { + return res.status(500).json({ + error: 404, + errorString: "No conveneince" + }); + } + else { + return res.status(200).json(conveneinceInfo); + } + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +router.get('/nevigation', (req, res) => __awaiter(void 0, void 0, void 0, function* () { + try { + return res.json({}); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +})); +module.exports = router; diff --git a/BackendJS/server.js b/BackendJS/server.js index 2b50cb2..c3af5fd 100644 --- a/BackendJS/server.js +++ b/BackendJS/server.js @@ -1,22 +1,50 @@ -const express = require('express'); -const app = express(); +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const express_1 = __importDefault(require("express")); +const app = (0, express_1.default)(); const port = 3005; -const path = require('path'); -const cors = require('cors'); -const db = require('./db'); +const path_1 = __importDefault(require("path")); +const cors_1 = __importDefault(require("cors")); +const db = __importStar(require("./db")); db.connect(); -const busRouter = require('./routes/busdata'); -const subwayRouter = require('./routes/subwaydata'); +const busdata_1 = __importDefault(require("./routes/busdata")); +const subwaydata_1 = __importDefault(require("./routes/subwaydata")); let corsOptions = { origin: ['http://localhost:3000/#/', 'http://localhost:3000', 'http://localhost:3005', 'http://34.168.80.42:3000', 'http://172.30.1.35:5000', 'http://localhost:5000'], credentials: true }; -app.use(cors(corsOptions)); -app.use(express.static(path.join(__dirname, './Frontend/creative/build'))); -app.use('/bus', busRouter); -app.use('/subway', subwayRouter); -app.get('/', function (req, res) { - res.sendFile(path.join(__dirname, './Frontend/creative/build/index.html')); +app.use((0, cors_1.default)(corsOptions)); +app.use(express_1.default.static(path_1.default.join(__dirname, './Frontend/creative/build'))); +app.use('/bus', busdata_1.default); +app.use('/subway', subwaydata_1.default); +app.get('/', (req, res) => { + res.sendFile(path_1.default.join(__dirname, './Frontend/creative/build/index.html')); }); app.get('/', (req, res) => { res.json({ diff --git a/BackendJS/server_copy.js b/BackendJS/server_copy.js deleted file mode 100644 index b7a6d22..0000000 --- a/BackendJS/server_copy.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const express_1 = __importDefault(require("express")); -const app = (0, express_1.default)(); -const port = 3005; -const path = require('path'); -const cors = require('cors'); -//const db:any = require('./db'); -//db.connect(); -//const busRouter:any = require('./routes/busdata'); -//const subwayRouter:any = require('./routes/subwaydata'); -let corsOptions = { - origin: ['http://localhost:3000/#/', 'http://localhost:3000', 'http://localhost:3005', 'http://34.168.80.42:3000', 'http://172.30.1.35:5000', 'http://localhost:5000'], - credentials: true -}; -app.use(cors(corsOptions)); -app.use(express_1.default.static(path.join(__dirname, './Frontend/creative/build'))); -//app.use('/bus', busRouter); -//app.use('/subway', subwayRouter); -app.get('/', function (req, res) { - res.sendFile(path.join(__dirname, './Frontend/creative/build/index.html')); -}); -app.get('/', (req, res) => { - res.json({ - success: true, - }); -}); -app.listen(port, () => { - console.log(`server is listening at localhost:${port}`); -}); -/* -//1시간 주기로 MySQL Connection 유지용 쿼리 보내기 -const mysql_Connect_Maintenance = setInterval(() => { - const connection:any = db.return_connection(); - connection.query("SELECT 1"); -}, 360000); //10분 -*/ diff --git a/BackendTS/db.ts b/BackendTS/db.ts new file mode 100644 index 0000000..a49d9c2 --- /dev/null +++ b/BackendTS/db.ts @@ -0,0 +1,33 @@ +import SQL_info from './KEY/SQL_info.json' +import mysql from 'mysql'; + +var connection:mysql.connection; + +//인터페이스로 정의 +const conn = { + host: SQL_info.host, + port: SQL_info.port, + user: SQL_info.user, + password: SQL_info.password, + database: SQL_info.database +}; + +function connect(){ + connection = mysql.createConnection(conn); // DB Connect + connection.connect(function(err){ + if(err){ + console.error(err); + console.error("MySQL connection err"); + return ; + } + console.log("MySQL connected"); + }); + + return connection; +} + +function return_connection(){ + return connection; +} + +export {connect,return_connection}; \ No newline at end of file diff --git a/BackendTS/package-lock.json b/BackendTS/package-lock.json new file mode 100644 index 0000000..03047ef --- /dev/null +++ b/BackendTS/package-lock.json @@ -0,0 +1,2038 @@ +{ + "name": "backendts", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "backendts", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "fs": "^0.0.1-security", + "mysql": "^2.18.1", + "path": "^0.12.7", + "request": "^2.88.2", + "xml-js": "^1.6.11" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "engines": { + "node": "*" + } + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "dependencies": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mysql/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz", + "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", + "dependencies": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/util/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + }, + "node_modules/xml-js": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", + "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", + "dependencies": { + "sax": "^1.2.4" + }, + "bin": { + "xml-js": "bin/cli.js" + } + } + }, + "dependencies": { + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==" + }, + "aws4": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + }, + "body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + } + }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "requires": { + "safe-buffer": "5.2.1" + } + }, + "content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" + }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" + }, + "express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "requires": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" + }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" + }, + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==" + }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "requires": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" + }, + "object-inspect": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz", + "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==" + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", + "requires": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, + "psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" + } + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" + }, + "send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "requires": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "dependencies": { + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==" + }, + "sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + } + } + }, + "xml-js": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", + "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", + "requires": { + "sax": "^1.2.4" + } + } + } +} diff --git a/BackendTS/package.json b/BackendTS/package.json new file mode 100644 index 0000000..9dc8a21 --- /dev/null +++ b/BackendTS/package.json @@ -0,0 +1,20 @@ +{ + "name": "backendts", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "fs": "^0.0.1-security", + "mysql": "^2.18.1", + "path": "^0.12.7", + "request": "^2.88.2", + "xml-js": "^1.6.11" + } +} diff --git a/BackendTS/routes/busdata.js b/BackendTS/routes/busdata.js deleted file mode 100644 index 0a81c70..0000000 --- a/BackendTS/routes/busdata.js +++ /dev/null @@ -1,219 +0,0 @@ -const router = require('express').Router(); -const request = require('request'); -const convert = require('xml-js'); -const serviceKey = require('../Key/serviceKey.json'); - -function getStation(stNm, callback) { - try { - const url = 'http://ws.bus.go.kr/api/rest/stationinfo/getLowStationByName'; - let queryParams = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey.serviceKey; - queryParams += '&' + encodeURIComponent('stSrch') + '=' + encodeURIComponent(stNm); - //console.log(url+queryParams); - //let StationList = []; - - return request({ - url: url + queryParams, - method: 'GET' - }, function (error, response, body) { - //console.log('Reponse received', body); - const parseJson = convert.xml2json(body); - const stationinfo = JSON.parse(parseJson).elements[0].elements[2]; - - if (stationinfo.elements == null) { - callback(0); - } - - else { - const stationlength = stationinfo.elements.length; - //console.log(stationinfo.elements[0]); - let stationRes = []; - - for (let i = 0; i < stationlength; i++) { - //arsId가 0인 경우 처리 - const arsId = stationinfo.elements[i].elements[0].elements[0].text; - const stId = stationinfo.elements[i].elements[3].elements[0].text; - const stNm = stationinfo.elements[i].elements[4].elements[0].text; - const tmX = stationinfo.elements[i].elements[5].elements[0].text; - const tmY = stationinfo.elements[i].elements[6].elements[0].text; - stationRes.push({ - arsId: arsId, - stId: stId, - stNm: stNm, - tmX: tmX, - tmY: tmY, - }) - } - - //console.log('Json', stationinfo); - //console.log(stationinfo.elements[0].elements[2]); - callback(stationRes); - } - - }); - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }); - } - - -} - -function getStationInfo(arsId, callback) { - - try { - const url = 'http://ws.bus.go.kr/api/rest/stationinfo/getLowStationByUid'; - let queryParams = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey.serviceKey; - queryParams += '&' + encodeURIComponent('arsId') + '=' + arsId; - - return request({ - url: url + queryParams, - method: 'GET' - }, function (error, response, body) { - - const parseJson = convert.xml2json(body); - const stationinfo = JSON.parse(parseJson).elements[0].elements[2]; - - //console.log(stationinfo); - - if (stationinfo.elements == null) { - callback(0); - } - - else { - const buslength = stationinfo.elements.length; - - - - let busInfo = []; - - for (let i = 0; i < buslength; i++) { - //console.log(stationinfo.elements[i]); - const adirection = stationinfo.elements[i].elements[0].elements[0].text; - const arrmsg1 = stationinfo.elements[i].elements[1].elements[0].text; - const busrouteAbrv = stationinfo.elements[i].elements[4].elements[0].text; - const busrouteid = stationinfo.elements[i].elements[5].elements[0].text; - const bustype = stationinfo.elements[i].elements[6].elements[0].text; - const nxtStn = stationinfo.elements[i].elements[22].elements[0].text; - - - let min = ""; - let sec = ""; - - let subtime = arrmsg1; - //[첫차] or [막차] 인 경우 - if (subtime[0] == "[") { - subtime = subtime.substr(6,); - } - - //분 없는 경우 - //초 없는 경우 - - if (subtime != "운행종료" && subtime != "곧 도착") { - //console.log(subtime.split("분")); - - let msgSplit = []; - - if (subtime.indexOf("분") != -1) { - msgSplit = subtime.split("분"); - min = msgSplit[0]; - if (subtime.indexOf("초") != -1) { - sec = msgSplit[1].split("초")[0]; - } - } - else { - sec = subtime.split("초")[0]; - } - } - - busInfo.push({ - busrouteid: busrouteid, - busrouteAbrv: busrouteAbrv, - bustype: bustype, - adirection: adirection, - nxtStn: nxtStn, - arrmsg1: arrmsg1, - min: min, - sec: sec, - }) - } - - //console.log(stationinfo); - - callback(busInfo); - } - //callback(stationinfo); - - }); - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }); - } - -} - - - -router.get('/stNm/:stNm', async (req, res) => { - - console.log('stationName'); - - try { - const stNm = req.params.stNm; - //console.log("station"); - await getStation(stNm, station => { - //console.log(station); - if (station == 0) { - return res.status(404).json({ - error: 'No stops with that name' - }) - } - return res.json(station); - }) - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }); - } - -}) - -router.get('/arsId/:arsId', async (req, res) => { - - console.log('arsId'); - - const arsId = req.params.arsId; - //console.log("station"); - try { - await getStationInfo(arsId, stationinfo => { - //console.log(station); - if (stationinfo == 0) { - return res.status(404).json({ - error: 'No Bus In Station' - }) - } - else - return res.json(stationinfo); - }); - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }); - }; - -}) - -module.exports = router; \ No newline at end of file diff --git a/BackendTS/routes/busdata.ts b/BackendTS/routes/busdata.ts new file mode 100644 index 0000000..fd43ba1 --- /dev/null +++ b/BackendTS/routes/busdata.ts @@ -0,0 +1,199 @@ +import express, {Request, Response, Router} from 'express' +import request from 'request' +import convert from 'xml-js' +import serviceKey from '../KEY/serviceKey.json' +import {BusInfo, BusItemList, BusStationInfo, BusStationList} from '../../interfaces/Bus/bus.interface' + +const router:Router = express.Router(); + +function getStation(stNm:string, callback:(stationinfo: Array)=>void) { + try { + const url:string = 'http://ws.bus.go.kr/api/rest/stationinfo/getLowStationByName'; + let queryParams:string = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey.serviceKey; + queryParams += '&' + encodeURIComponent('stSrch') + '=' + encodeURIComponent(stNm); + + return request({ + url: url + queryParams, + method: 'GET' + }, function (error:Error, response:any, body:string) { + + const parseJson:string = convert.xml2json(body); + const stationinfo:BusStationList = JSON.parse(parseJson).elements[0].elements[2]; + + //빈 배열 선언 + const stationRes:Array = []; + + //정류장이 없는 경우 빈 배열 반환 + if (stationinfo.elements === undefined) { + callback(stationRes); + } + else { + const stationlength:number = stationinfo.elements.length; + + for (let i = 0; i < stationlength; i++) { + //arsId가 0인 경우 처리 + const arsId:string = stationinfo.elements[i].elements[0].elements[0].text; + const stId:string = stationinfo.elements[i].elements[3].elements[0].text; + const stNm:string = stationinfo.elements[i].elements[4].elements[0].text; + const tmX:string = stationinfo.elements[i].elements[5].elements[0].text; + const tmY:string = stationinfo.elements[i].elements[6].elements[0].text; + stationRes.push({ + arsId: arsId, + stId: stId, + stNm: stNm, + tmX: tmX, + tmY: tmY, + }) + } + + callback(stationRes); + } + + }); + } + catch (e) { + console.error(e); + } + + +} + +function getStationInfo(arsId:string, callback:(busInfo: Array)=>void) { + + try { + const url:string = 'http://ws.bus.go.kr/api/rest/stationinfo/getLowStationByUid'; + let queryParams:string = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey.serviceKey; + queryParams += '&' + encodeURIComponent('arsId') + '=' + arsId; + + return request({ + url: url + queryParams, + method: 'GET' + }, function (error:Error, response:any, body:string) { + + const parseJson:string = convert.xml2json(body); + const stationinfo:BusItemList = JSON.parse(parseJson).elements[0].elements[2]; + + const busInfo:Array = []; + + if (stationinfo.elements === undefined) { + callback(busInfo); + } + + else { + const buslength:number = stationinfo.elements.length; + + for (let i = 0; i < buslength; i++) { + const adirection:string = stationinfo.elements[i].elements[0].elements[0].text; + const arrmsg1:string = stationinfo.elements[i].elements[1].elements[0].text; + const busrouteAbrv:string = stationinfo.elements[i].elements[4].elements[0].text; + const busrouteid:string = stationinfo.elements[i].elements[5].elements[0].text; + const bustype:string = stationinfo.elements[i].elements[6].elements[0].text; + const nxtStn:string = stationinfo.elements[i].elements[22].elements[0].text; + + + let min:string = ""; + let sec:string = ""; + + let subtime:string = arrmsg1; + + /* + //[첫차] or [막차] 인 경우 + if (subtime[0] == "[") { + subtime = subtime.substr(6,); + } + */ + + //분 없는 경우 + //초 없는 경우 + + if (subtime != "운행종료" && subtime != "곧 도착") { + let msgSplit:Array = []; + + if (subtime.indexOf("분") !== -1) { + msgSplit = subtime.split("분"); + min = msgSplit[0]; + if (subtime.indexOf("초") !== -1) { + sec = msgSplit[1].split("초")[0]; + } + } + else { + sec = subtime.split("초")[0]; + } + } + + busInfo.push({ + busrouteid: busrouteid, + busrouteAbrv: busrouteAbrv, + bustype: bustype, + adirection: adirection, + nxtStn: nxtStn, + arrmsg1: arrmsg1, + min: min, + sec: sec, + }) + } + + callback(busInfo); + } + }); + } + catch (e) { + console.error(e); + } + +} + +//버스 정류장 이름으로 검색하기 +router.get('/stNm/:stNm', async (req:Request, res:Response) => { + + try { + const stNm:string = req.params.stNm; + + await getStation(stNm, station => { + + if (station.length === 0) { + return res.status(404).json({ + error: 'No stops with that name' + }) + } + return res.json(station); + }) + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } + +}) + +//정류소 아이디로 정보 제공 +router.get('/arsId/:arsId', async (req:Request, res:Response) => { + + const arsId:string = req.params.arsId; + + try { + await getStationInfo(arsId, stationinfo => { + + if (stationinfo.length === 0) { + return res.status(404).json({ + error: 'No Bus In Station' + }) + } + else + return res.json(stationinfo); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + }; + +}) + +export = router; \ No newline at end of file diff --git a/BackendTS/routes/develop.js b/BackendTS/routes/develop.js deleted file mode 100644 index 6e734b4..0000000 --- a/BackendTS/routes/develop.js +++ /dev/null @@ -1,71 +0,0 @@ -const router = require('express').Router(); -const request = require('request'); -const convert = require('xml-js'); -const serviceKey = require('../Key/serviceKey.json'); - -const SQL_info = require('../Key/SQL_info.json') -const mysql = require('mysql'); - -const conn = { - host: SQL_info.host, - port: SQL_info.port, - user: SQL_info.user, - password: SQL_info.password, - database: SQL_info.database -}; - -let connection = mysql.createConnection(conn); // DB Connect - -//SubwayStation Name List from DB -function getSubwayStationName(stNm, callback) { - try { - - console.log("StationName"); - - let sql = "Select * FROM subcode_1,subcode_2;"; - - let NameList = []; - connection.query(sql, function (err, results, fields) { - if (err) { - console.log(err); - } - - callback(results); - }); - - } - catch (e) { - console.error(e); - callback(e); - } -} - -router.get('/stNm/:stNm', async (req, res) => { - try { - - stNm = req.params.stNm; - - await getSubwayStationName(stNm, stationList => { - if (stationList.length == 0) { - return res.status(500).json({ - error: "No Station" - }) - } - else { - return res.json( - stationList, - ) - } - - }); - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }) - } -}) - -module.exports = router; \ No newline at end of file diff --git a/BackendTS/routes/navigation.ts b/BackendTS/routes/navigation.ts new file mode 100644 index 0000000..43ea2cd --- /dev/null +++ b/BackendTS/routes/navigation.ts @@ -0,0 +1,512 @@ +import express, {Request, Response, Router} from 'express' +import request from 'request' +import convert from 'xml-js' +import serviceKey from '../KEY/serviceKey.json' +import { NavigationResult, NavigationPath, RecommendPathList } from '../../interfaces/Navigation/navigation.interface' + +const router:Router = express.Router(); + +const velocity:number = 46.8; + +function deg2rad(deg:number){ + return (deg * Math.PI / 180); +} + +function rad2deg(rad:number){ + return (rad * 180 / Math.PI); +} + +function distance (lat1:number, lon1:number, lat2:number, lon2:number){ + if(lat1===lat2 && lon1==lon2){ + return 0; + } + else{ + let theta:number = lon1-lon2; + let dist:number = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta)); + dist = Math.acos(dist); + dist = rad2deg(dist); + dist = dist * 60 * 1.1515; + dist = dist * 1.609344; + + //dist를 지름으로 한 원 내부의 직각삼각형 두 변의 길이 + return dist*Math.sqrt(2); + } +} + +/* + +router.get('/bybus/:startX/:startY/:endX/:endY', async(req:Request, res:Response)=>{ + try{ + + const startX: string = req.params.startX; + const startY: string = req.params.startY; + const endX: string = req.params.endX; + const endY: string = req.params.endY; + + const url:string = "http://ws.bus.go.kr/api/rest/pathinfo/getPathInfoByBus"; + let queryParams:string = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey.serviceKey; + queryParams += '&' + encodeURIComponent('startX') + '=' + startX; + queryParams += '&' + encodeURIComponent('startY') + '=' + startY; + queryParams += '&' + encodeURIComponent('endX') + '=' + endX; + queryParams += '&' + encodeURIComponent('endY') + '=' + endY; + + request({ + url: url + queryParams, + method: 'GET' + }, async function (error:Error, response:any, body:string) { + + const parseJSON:string = convert.xml2json(body); + + const navigationList:any = JSON.parse(parseJSON).elements[0].elements[2].elements; + + const navigationInfo:Array = []; + console.log(parseJSON); + navigationList.forEach((info:any) => { + const tempInfo:NavigationList = { + distance: "", //총 이동 거리 + pathList: [], //이동 경로 + timeList: [], //이동 시간 + totalTime: "", // 총 이동 시간 + walkTime: 0, //총 도보 이동 시간 + }; + tempInfo.distance = info.elements[0].elements[0].text; + tempInfo.totalTime = info.elements[2].elements[0].text; + + //첫 출발지랑 정류장/역 사이 거리 + let x1:number = Number(startX); + let y1:number = Number(startY); + let x2:number = Number(info.elements[1].elements[2].elements[0].text); + let y2:number = Number(info.elements[1].elements[3].elements[0].text); + let dist:number = distance(x1,y1,x2,y2); + + tempInfo.timeList.push(Math.floor(dist/velocity)); + tempInfo.walkTime += Math.floor(dist/velocity); + + for(let i:number=0;i{ + + if( a.pathList.length === b.pathList.length){ + return a.walkTime - b.walkTime; + } + + return a.pathList.length - b.pathList.length + }) + + return res.status(200).json({ + navigationInfo: navigationInfo + }) + + }); + } + catch(e){ + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +}) + +router.get('/bysubway/:startX/:startY/:endX/:endY', async(req:Request,res:Response)=>{ + try{ + + //지하철 환승 이동 시간 필요 + const startX: string = req.params.startX; + const startY: string = req.params.startY; + const endX: string = req.params.endX; + const endY: string = req.params.endY; + + const url:string = "http://ws.bus.go.kr/api/rest/pathinfo/getPathInfoBySubway"; + let queryParams:string = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey.serviceKey; + queryParams += '&' + encodeURIComponent('startX') + '=' + startX; + queryParams += '&' + encodeURIComponent('startY') + '=' + startY; + queryParams += '&' + encodeURIComponent('endX') + '=' + endX; + queryParams += '&' + encodeURIComponent('endY') + '=' + endY; + + request({ + url: url + queryParams, + method: 'GET' + }, async function (error:Error, response:any, body:string) { + + const parseJSON:string = convert.xml2json(body); + + console.log(parseJSON); + + const navigationList:any = JSON.parse(parseJSON).elements[0].elements[2].elements; + + const navigationInfo:Array = []; + navigationList.forEach((info:any) => { + const tempInfo:NavigationList = { + distance: "", //총 이동 거리 + pathList: [], //이동 경로 + timeList: [], //이동 시간 + totalTime: "", // 총 이동 시간 + walkTime: 0, //총 도보 이동 시간 + }; + tempInfo.distance = info.elements[0].elements[0].text; + tempInfo.totalTime = info.elements[2].elements[0].text; + + //첫 출발지랑 정류장/역 사이 거리 + let x1:number = Number(startX); + let y1:number = Number(startY); + let x2:number = Number(info.elements[1].elements[2].elements[0].text); + let y2:number = Number(info.elements[1].elements[3].elements[0].text); + let dist:number = distance(x1,y1,x2,y2); + + tempInfo.timeList.push(Math.floor(dist/velocity)); + tempInfo.walkTime += Math.floor(dist/velocity); + + for(let i:number=0;i = []; + + for(let j:number = 0;j{ + + if( a.pathList.length === b.pathList.length){ + return a.walkTime - b.walkTime; + } + + return a.pathList.length - b.pathList.length + }) + + return res.status(200).json({ + navigationInfo: navigationInfo + }) + + }); + } + catch(e){ + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +}) + +router.get('/bybusNsubway/:startX/:startY/:endX/:endY', async(req:Request,res:Response)=>{ + //버스 -> 지하철 / 지하철 -> 버스로 이동하는 시간 고려 + try{ + + //지하철 환승 이동 시간 필요 + const startX: string = req.params.startX; + const startY: string = req.params.startY; + const endX: string = req.params.endX; + const endY: string = req.params.endY; + + const url:string = "http://ws.bus.go.kr/api/rest/pathinfo/getPathInfoByBusNSub"; + let queryParams:string = '?' + encodeURIComponent('serviceKey') + '=' + serviceKey.serviceKey; + queryParams += '&' + encodeURIComponent('startX') + '=' + startX; + queryParams += '&' + encodeURIComponent('startY') + '=' + startY; + queryParams += '&' + encodeURIComponent('endX') + '=' + endX; + queryParams += '&' + encodeURIComponent('endY') + '=' + endY; + queryParams += '&' + encodeURIComponent('resultType=json'); + + request({ + url: url + queryParams, + method: 'GET' + }, async function (error:Error, response:any, body:string) { + + console.log(body); + const parseJSON:string = convert.xml2json(body); + + //console.log(parseJSON); + + const navigationList:any = JSON.parse(parseJSON).elements[0].elements[2].elements; + + const navigationInfo:Array = []; + navigationList.forEach((info:any) => { + const tempInfo:NavigationList = { + distance: "", //총 이동 거리 + pathList: [], //이동 경로 + timeList: [], //이동 시간 + totalTime: "", // 총 이동 시간 + walkTime: 0, //총 도보 이동 시간 + }; + tempInfo.distance = info.elements[0].elements[0].text; + tempInfo.totalTime = info.elements[2].elements[0].text; + + //첫 출발지랑 정류장/역 사이 거리 + let x1:number = Number(startX); + let y1:number = Number(startY); + let x2:number = Number(info.elements[1].elements[2].elements[0].text); + let y2:number = Number(info.elements[1].elements[3].elements[0].text); + let dist:number = distance(x1,y1,x2,y2); + + tempInfo.timeList.push(Math.floor(dist/velocity)); + tempInfo.walkTime += Math.floor(dist/velocity); + + for(let i:number=0;i{ + + if( a.pathList.length === b.pathList.length){ + return a.walkTime - b.walkTime; + } + + return a.pathList.length - b.pathList.length + }) + + return res.status(200).json({ + navigationInfo: navigationInfo + }) + + }); + } + catch(e){ + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +}) +*/ + +router.get('/:startX/:startY/:endX/:endY/:type',async(req:Request,res:Response)=>{ + try{ + const startX:number = req.params.startX; + const startY:number = req.params.startY; + const endX:number = req.params.endX; + const endY:number = req.params.endY; + const pathType:number = (req.params.type === "subway" ? 1 : (req.params.type === "bus" ? 2 : 0)); + + const url:string = 'https://api.odsay.com/v1/api/searchPubTransPathT'; + let queryParams:string = '?' + encodeURIComponent('lang') + '=' + encodeURIComponent('0'); + queryParams += '&' + encodeURIComponent('SX') + '=' + startX; + queryParams += '&' + encodeURIComponent('SY') + '=' + startY; + queryParams += '&' + encodeURIComponent('EX') + '=' + endX; + queryParams += '&' + encodeURIComponent('EY') + '=' + endY; + queryParams += '&' + encodeURIComponent('apiKey') + '=' + encodeURIComponent(serviceKey.OdsayKey); + queryParams += '&' + encodeURIComponent('SearchPathType') + '=' + pathType; + + request({ + url: url + queryParams, + method: 'GET' + }, async function (error:Error, response:any, body:string) { + + if(JSON.parse(body).hasOwnProperty("error")){ + console.error(JSON.parse(body).error); + return res.status(500).json({ + error: JSON.parse(body).error + }) + } + + //JSON parse + const NavigationList:NavigationResult = JSON.parse(body).result; + + //console.log(error); + //console.log(response); + + + //1. 도보 시간, 2. 환승 개수, 3. 총 이동 시간 + NavigationList.path.sort((a:NavigationPath, b:NavigationPath)=>{ + if(a.info.totalWalk === b.info.totalWalk){ + if(a.info.busTransitCount + a.info.subwayTransitCount === b.info.busTransitCount + b.info.subwayTransitCount){ + return a.info.totalTime - b.info.totalTime; + } + else{ + return a.info.busTransitCount + a.info.subwayTransitCount - b.info.busTransitCount + b.info.subwayTransitCount; + } + } + else { + return a.info.totalWalk - b.info.totalWalk; + } + }) + + //상위 5개 경로만 반환 + NavigationList.path = NavigationList.path.slice(0,5); + + NavigationList.path.forEach(element => { + //일반인 기준 이동시간 저장 + const t = element.info.totalWalkTime; + //도보 이동 시간 계산 + element.info.totalWalkTime = Math.floor((element.info.totalWalk * Math.sqrt(2) / velocity) + 0.9999999999); + //추가 시간 포함 + element.info.totalTime += element.info.totalWalkTime - t; + + //info 정리 + delete element.info.trafficDistance; + delete element.info.totalStationCount; + delete element.info.busStationCount; + delete element.info.subwayStationCount; + delete element.info.totalDistance; + delete element.info.checkIntervalTime; + delete element.info.checkIntervalTimeOverYn; + + //subPath 정리 + element.subPath.forEach(element=>{ + //도보인 경우 + if(element.trafficType === 3){ + //교통약자 평균 이동속도에 맞게 이동시간 조정 + element.sectionTime = Math.floor((element.distance * Math.sqrt(2) / velocity) + 0.9999999999); + } + //버스인 경우 + else if(element.trafficType === 2){ + delete element.lane[0].busCityCode; + delete element.lane[0].busProviderCode; + delete element.startStationCityCode; + delete element.startStationProviderCode; + delete element.startID; + delete element.endStationCityCode; + delete element.endStationProviderCode; + delete element.endID; + + element.passStopList.stations.forEach(element=>{ + delete element.stationID; + delete element.stationCityCode; + delete element.stationProviderCode; + delete element.isNonStop; + }) + } + //지하철인 경우 + else if(element.trafficType === 1){ + delete element.lane[0].subwayCityCode; + } + }) + }); + + return res.status(200).json(NavigationList.path); + }); + + } + catch(e){ + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }); + } +}) +export = router; \ No newline at end of file diff --git a/BackendTS/routes/subwaydata.js b/BackendTS/routes/subwaydata.js deleted file mode 100644 index 07a2ee4..0000000 --- a/BackendTS/routes/subwaydata.js +++ /dev/null @@ -1,769 +0,0 @@ -const serviceKey = require('../Key/serviceKey.json'); -const router = require('express').Router(); -const request = require('request'); - -const SQL_info = require('../Key/SQL_info.json') -const mysql = require('mysql'); - -const conn = { - host: SQL_info.host, - port: SQL_info.port, - user: SQL_info.user, - password: SQL_info.password, - database: SQL_info.database -}; - -let connection = mysql.createConnection(conn); // DB Connect - -//SubwayStation Name List from DB -function getSubwayStationName(stNm, callback){ - try { - - console.log("StationName"); - - let sql = "Select * FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.STIN_NM like ?; "; - - let NameList = []; - connection.query(sql, ["%"+stNm+"%"], function (err, results, fields) { - if (err) { - console.log(err); - } - for (let i = 0; i < results.length; i++) { - - NameList.push({ - railCd: results[i].RAIL_OPR_ISTT_CD, - lnCd: results[i].LN_CD, - lnNm: results[i].LN_CD, - stCd: results[i].STIN_CD, - stNm: results[i].STIN_NM, - }) - } - - callback(NameList); - }); - - } - catch (e) { - console.error(e); - callback(e); - } -} - -function getSubwayStationInfo(stCd, stNm, callback) { - try { - - //let sql = "select * from subcode_1,subcode_2"; - let sql = "Select * FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.stin_cd = ? and a.stin_nm = ?"; - - connection.query(sql, [stCd, stNm], function (err, results, fields) { - if (err) { - console.log(err); - } - - console.log("SubwayStationInfo"); - //console.log(results); - - //NULL error - if (results.length == 0) { - return callback({ - error: 500, - errorString: "No Such Station" - }) - } - - const url = 'https://openapi.kric.go.kr/openapi/convenientInfo/stationInfo'; - let queryParams = '?' + encodeURI('serviceKey'); - queryParams += '=' + serviceKey.subwayRailKey; - queryParams += '&' + encodeURI('format') + '=' + encodeURI('json'); - queryParams += '&' + encodeURI('railOprIsttCd'); - queryParams += '=' + encodeURI(results[0].RAIL_OPR_ISTT_CD); - queryParams += '&' + encodeURI('lnCd'); - queryParams += '=' + encodeURI(results[0].LN_CD); - queryParams += '&' + encodeURI('stinCd'); - queryParams += '=' + encodeURI(results[0].STIN_CD); - queryParams += '&' + encodeURI('stinNm'); - queryParams += '=' + encodeURI(results[0].STIN_NM); - - return request({ - url: url + queryParams, - method: 'GET' - }, function (error, response, body) { - - const stationinfo = JSON.parse(body).body[0]; - - callback({ - railCd: stationinfo.railOprIsttCd, - lnCd: stationinfo.lnCd, - stCd: stationinfo.stinCd, - stNm: stationinfo.stinNm, - roadNm: stationinfo.roadNmAdr, - tmX: stationinfo.stinLocLon, - tmY: stationinfo.stinLocLat, - wNum: results[0].wnum, - eName: results[0].en_name, - fCode: results[0].f_code - }); - - }); - - - }); - - } - catch (e) { - console.error(e); - callback(e); - } -} - -function getLiftPos(stCd, stNm, railCd, lnCd, callback) { - try { - - console.log("LiftPos"); - - const url = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/stationWheelchairLiftLocation'; - let queryParams = '?' + encodeURI('serviceKey') + '=' + serviceKey.subwayRailKey; - queryParams += '&' + encodeURI('format') + '=' + encodeURI('json'); - queryParams += '&' + encodeURI('railOprIsttCd') + '=' + encodeURI(railCd); - queryParams += '&' + encodeURI('lnCd') + '=' + encodeURI(lnCd); - queryParams += '&' + encodeURI('stinCd') + '=' + encodeURI(stCd); - - return request({ - url: url + queryParams, - method: 'GET' - }, function (error, response, body) { - - liftPosInfo = JSON.parse(body).body; - - callback(liftPosInfo[0]); - - }); - - } - catch { - console.error(e); - callback(e); - } -} - -function getLiftMove(stCd, stNm, railCd, lnCd, callback) { - try { - - console.log("LiftMove"); - - let liftMoveInfo = []; - - const url = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/stationWheelchairLiftMovement'; - let queryParams = '?' + encodeURIComponent('serviceKey'); - queryParams += '=' + serviceKey.subwayRailKey; - queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); - queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); - queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); - queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); - - return request({ - url: url + queryParams, - method: 'GET' - }, function (error, response, body) { - - //목적지 별로 구분하여 제공 - const liftMoveParse = JSON.parse(body).body; - - let liftInfo = []; - - for (let i = 0; i < liftMoveParse.length; i++) { - if (liftMoveParse[i].mvTpOrdr == 1) { - if (liftInfo.length != 0) { - const direction = liftInfo[liftInfo.length - 2].mvContDtl.split('승강장')[0].substr(3); - liftInfo.unshift({ - direction: direction - }) - - liftMoveInfo.push(liftInfo); - liftInfo = []; - } - } - liftInfo.push(liftMoveParse[i]); - } - if (liftInfo.length != 0) { - const direction = liftInfo[liftInfo.length - 2].mvContDtl.split('승강장')[0].substr(3); - - liftInfo.unshift({ - direction: direction - }) - liftMoveInfo.push(liftInfo); - liftInfo = []; - } - - callback(liftMoveInfo); - }); - } - catch (e) { - console.error(e); - callback(e); - } -} - -function getElevatorPos(stCd, stNm, railCd, lnCd, callback) { - try { - - console.log("ElevatorPos"); - - const url = 'https://openapi.kric.go.kr/openapi/convenientInfo/stationElevator'; - - let queryParams = '?' + encodeURIComponent('serviceKey'); - queryParams += '=' + serviceKey.subwayRailKey; - queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); - queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); - queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); - queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); - - return request({ - url: url + queryParams, - method: 'GET' - }, function (error, response, body) { - ElevatorPosInfo = JSON.parse(body).body; - callback(ElevatorPosInfo); - }); - } - catch (e) { - console.error(e); - callback(e); - } -} - - -function getElevatorMove(stCd, stNm, railCd, lnCd, callback) { - try { - - console.log("ElevatorMove"); - - const url = 'https://openapi.kric.go.kr/openapi/trafficWeekInfo/stinElevatorMovement'; - let queryParams = '?' + encodeURIComponent('serviceKey'); - queryParams += '=' + serviceKey.subwayRailKey; - queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); - queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); - queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); - queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); - - let elevatorMove = []; - - return request({ - url: url + queryParams, - method: 'GET' - }, function (error, response, body) { - - let elevatorInfo = []; - - const elevatorMoveParse = JSON.parse(body).body; - - for (let i = 0; i < elevatorMoveParse.length; i++) { - if (elevatorMoveParse[i].mvTpOrdr == 1) { - if (elevatorInfo.length != 0) { - const direction = elevatorInfo[elevatorInfo.length - 2].mvContDtl.split('승강장')[0].substr(3); - elevatorInfo.unshift({ - direction: direction - }) - elevatorMove.push(elevatorInfo); - elevatorInfo = []; - } - } - elevatorInfo.push(elevatorMoveParse[i]); - } - if (elevatorInfo.length != 0) { - const direction = elevatorInfo[elevatorInfo.length - 2].mvContDtl.split('승강장')[0].substr(3); - elevatorInfo.unshift({ - direction: direction - }) - elevatorMove.push(elevatorInfo); - elevatorInfo = []; - } - - callback(elevatorMove); - }); - } - catch (e) { - console.error(e); - callback(e); - } -} - - -function getTransferList(stCd, stNm, railCd, lnCd, callback) { - try { - let transferList = []; - - console.log("transferList"); - - let sql = "Select * FROM subcode_1 WHERE (STIN_CD = ? or STIN_CD = ?) and LN_CD = ? and RAIL_OPR_ISTT_CD = ?;"; - - connection.query(sql, [parseInt(stCd) + 1, parseInt(stCd) -1, lnCd, railCd], function (err, results, fields) { - - if (err) { - console.log(err); - } - - let sourceStation = []; - - if (results.length == 0) { - return callback({ - error: 404, - errorString: "Not Transfer Station" - }); - } - else { - for (let i = 0; i < results.length; i++) { - sourceStation.push({ - stCd: results[i].STIN_CD, - stNm: results[i].STIN_NM, - railCd: results[i].RAIL_OPR_ISTT_CD, - lnCd: results[i].LN_CD - }) - } - - } - transferList.push({ - sourceStation: sourceStation - }) - }); - - sql = "Select * FROM subcode_1 WHERE STIN_NM = ?;"; - connection.query(sql, [stNm], function (err, results, fields) { - - if (err) { - console.log(err); - } - - if (results.length == 1) { - return callback({ - error: 404, - errorString: "Not Transfer Station" - }); - } - - for (let i = 0; i < results.length; i++) { - if (results[i].STIN_CD != stCd) { - const sql2 = "Select * FROM subcode_1 WHERE (STIN_CD = ? or STIN_CD = ?) and RAIL_OPR_ISTT_CD = ?;"; - connection.query(sql2, [parseInt(results[i].STIN_CD) + 1, parseInt(results[i].STIN_CD) - 1, results[i].RAIL_OPR_ISTT_CD], function (err, results2, fields) { - let transferStation = []; - - for (let j = 0; j < results2.length; j++) { - transferStation.push({ - stCd: results2[j].STIN_CD, - stNm: results2[j].STIN_NM, - railCd: results2[j].RAIL_OPR_ISTT_CD, - lnCd: results2[j].LN_CD - }) - } - transferList.push({ - transferStation: transferStation - }) - callback(transferList); - }); - - } - } - - }); - - } - - catch (e) { - console.error(e); - callback(e); - } -} - -function getTransferInfo(stCd, stNm, railCd, lnCd, prev, chthTgtLn , chtnNextStinCd , callback) { - try { - - let sql = "Select * FROM subcode_1 WHERE STIN_NM = ? and LN_CD = ?;"; - let transferInfo = []; - - connection.query(sql, [stNm, chthTgtLn], function (err, results, fields) { - - if (err) { - console.log(err); - } - - let prevStinCd = ""; - - if (parseInt(results[0].STIN_CD) + 1 == parseInt(chtnNextStinCd)) { - prevStinCd = parseInt(results[0].STIN_CD) - 1; - } - else { - prevStinCd = parseInt(results[0].STIN_CD) + 1; - } - - const url = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/transferMovement'; - let queryParams = '?' + encodeURIComponent('serviceKey'); - queryParams += '=' + serviceKey.subwayRailKey; - queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); - queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); - queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); - queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); - queryParams += '&' + encodeURIComponent('prevStinCd') + '=' + encodeURIComponent(prevStinCd); - queryParams += '&' + encodeURIComponent('chthTgtLn') + '=' + encodeURIComponent(chthTgtLn); - queryParams += '&' + encodeURIComponent('chtnNextStinCd') + '=' + encodeURIComponent(chtnNextStinCd); - - //chtnNextStinCd -> 상행선 1,3 - //chtnNextStinCd -> 하행선 2,4 - - //parse Int 어캐해야됨 - //상행 하행 구분 어캐해야됨 - - return request({ - url: url + queryParams, - method: 'GET' - }, function (error, response, body) { - const parse = JSON.parse(body).body; - - for (let i = 0; i < parse.length; i++) { - //성수가 211 하행 - //railCd로 비교 - - //2호선의 경우 상 하행이 반대 - if (railCd == "S1" && lnCd == "2") { - - //환승역 방면이 상행선이라면 2, 4만 나옴 - if (parseInt(prevStinCd) > parseInt(chtnNextStinCd)) { - //출발 방면이 상행선이라면 - if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo == 2) { - transferInfo.push(parse[i]); - } - //출발 방면이 하행선이라면 - else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo == 1) { - transferInfo.push(parse[i]); - } - } - //하행선인 경우 - else { - //출발 방면이 상행선이라면 - if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo == 4) { - transferInfo.push(parse[i]); - } - //출발 방면이 하행선이라면 - else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo == 3) { - transferInfo.push(parse[i]); - } - } - } - else { - //환승역 방면이 상행선이라면 1,3만 나옴 - if (parseInt(prevStinCd) > parseInt(chtnNextStinCd)) { - //출발 방면이 상행선이라면 - if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo == 1) { - transferInfo.push(parse[i]); - } - //출발 방면이 하행선이라면 - else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo == 3) { - transferInfo.push(parse[i]); - } - } - //하행선인 경우 - else { - //출발 방면이 상행선이라면 - if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo == 2) { - transferInfo.push(parse[i]); - } - //출발 방면이 하행선이라면 - else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo == 4) { - transferInfo.push(parse[i]); - } - } - } - } - callback(transferInfo); - }); - - }); - - } - - catch (e) { - console.error(e); - callback(e); - } -} - -function getConvenience(stCd, stNm, railCd, lnCd, callback) { - try { - - let conveneinceInfo = []; - - const url = 'https://openapi.kric.go.kr/openapi/handicapped/stationCnvFacl'; - let queryParams = '?' + encodeURIComponent('serviceKey'); - queryParams += '=' + serviceKey.subwayRailKey; - queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); - queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); - queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); - queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); - - return request({ - url: url + queryParams, - method: 'GET' - }, function (error, response, body) { - const parse = JSON.parse(body).body; - - for (let i = 0; i < parse.length; i++) { - if (parse[i].gubun == "EV" || parse[i].gubun == "WCLF") { - conveneinceInfo.push(parse[i]); - } - } - - //No Data - if (conveneinceInfo.length == 0) { - conveneinceInfo.push({ - error: 404, - errorString: "No conveneince" - }) - } - - callback(conveneinceInfo); - }); - } - catch (e) { - console.error(e); - callback(e); - } -} - -router.get('/stNm/:stNm', async (req, res) => { - try { - - stNm = req.params.stNm; - - await getSubwayStationName(stNm, stationList => { - if (stationList == 0) { - return res.status(500).json({ - error: "No Station" - }) - } - else { - return res.json( - stationList, - ) - } - - }); - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }) - } -}) - -router.get('/stationInfo/:stCd/:stNm', async (req, res) => { - try { - - stCd = req.params.stCd; - stNm = req.params.stNm; - - await getSubwayStationInfo(stCd, stNm, stationinfo => { - return res.json({ - stationinfo - }) - }) - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }) - } -}) - -router.get('/liftPos/:stCd/:stNm/:railCd/:lnCd', async (req, res) => { - try { - stCd = req.params.stCd; - stNm = req.params.stNm; - railCd = req.params.railCd; - lnCd = req.params.lnCd; - - await getLiftPos(stCd, stNm, railCd, lnCd, liftPosInfo => { - - return res.json({ - "railOprIsttCd": liftPosInfo.railOprIsttCd, - "lnCd": liftPosInfo.lnCd, - "stinCd": liftPosInfo.stinCd, - "exitNo": liftPosInfo.exitNo, - "dtlLoc": liftPosInfo.dtlLoc, - "grndDvNmFr": liftPosInfo.grndDvNmFr, - "runStinFlorFr": liftPosInfo.runStinFlorFr, - "grndDvNmTo": liftPosInfo.grndDvNmTo, - "runStinFlorTo": liftPosInfo.runStinFlorTo, - "len": liftPosInfo.len, - "wd": liftPosInfo.wd, - "bndWgt": liftPosInfo.bndWgt - }); - }) - - - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }) - } -}) - -router.get('/liftMove/:stCd/:stNm/:railCd/:lnCd', async (req, res) => { - console.log("liftMove"); - try { - stCd = req.params.stCd; - stNm = req.params.stNm; - railCd = req.params.railCd; - lnCd = req.params.lnCd; - - await getLiftMove(stCd, stNm, railCd, lnCd, callback => { - return res.json(callback); - }); - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }) - } -}) - -router.get('/ElevatorPos/:stCd/:stNm/:railCd/:lnCd', async (req, res) => { - try { - stCd = req.params.stCd; - stNm = req.params.stNm; - railCd = req.params.railCd; - lnCd = req.params.lnCd; - - await getElevatorPos(stCd, stNm, railCd, lnCd, callback => { - return res.json(callback) - }); - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }) - } -}) - -router.get('/ElevatorMove/:stCd/:stNm/:railCd/:lnCd', async (req, res) => { - try { - stCd = req.params.stCd; - stNm = req.params.stNm; - railCd = req.params.railCd; - lnCd = req.params.lnCd; - - await getElevatorMove(stCd, stNm, railCd, lnCd, callback => { - return res.json(callback); - }); - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }) - } -}) - - -router.get('/transferMove/transferList/:stCd/:stNm/:railCd/:lnCd', async (req, res) => { - try { - - stCd = req.params.stCd; - stNm = req.params.stNm; - railCd = req.params.railCd; - lnCd = req.params.lnCd; - - await getTransferList(stCd, stNm, railCd, lnCd, callback => { - if (callback.error != null) { - return res.status(500).json(callback) - } - return res.json(callback) - }); - - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }) - } -}); - -router.get('/transferMove/transferInfo/:stCd/:stNm/:railCd/:lnCd/:prevStinCd/:chthTgtLn/:chtnNextStinCd', async (req, res) => { - try { - - stCd = req.params.stCd; - stNm = req.params.stNm; - railCd = req.params.railCd; - lnCd = req.params.lnCd; - prevStinCd = req.params.prevStinCd; - chthTgtLn = req.params.chthTgtLn; - chtnNextStinCd = req.params.chtnNextStinCd; - - await getTransferInfo(stCd, stNm, railCd, lnCd, prevStinCd, chthTgtLn, chtnNextStinCd, callback => { - - return res.json(callback) - }); - - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }) - } -}); - -router.get('/convenience/:stCd/:stNm/:railCd/:lnCd', async (req, res) => { - try { - stCd = req.params.stCd; - stNm = req.params.stNm; - railCd = req.params.railCd; - lnCd = req.params.lnCd; - - await getConvenience(stCd, stNm, railCd, lnCd, callback => { - if (callback.error != null) { - return res.status(500).json(callback[0]); - } - else return res.json(callback); - }); - - - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }) - } -}); - -router.get('/nevigation', async (req, res) => { - try { - return res.json({ - - }) - } - catch (e) { - console.error(e); - return res.status(500).json({ - error: e, - errorString: e.toString(), - }) - } -}); - -module.exports = router; diff --git a/BackendTS/routes/subwaydata.ts b/BackendTS/routes/subwaydata.ts new file mode 100644 index 0000000..fcef989 --- /dev/null +++ b/BackendTS/routes/subwaydata.ts @@ -0,0 +1,751 @@ +import serviceKey from '../KEY/serviceKey.json' +import express, {Request, Response, Router} from 'express' +import request from 'request' +import * as db from '../db' +import mysql from 'mysql' + +import {SubwayStationNameList, SubwayStationInfo, SubwayStationInfoRequest, SubwayStationLiftPos, SubwayStationLiftMove, SubwayStationLiftInfo, SubwayStationElevatorPosInfo, SubwayStationElevatorMove, SubwayStationElevatorMoveInfo, SubwayStationConvenience, SubwayStationConvenienceInfo, SubwayStationTransferStationInfo, SubwayStationTransferInfo, SubwayStationTransferMoveList} from '../../interfaces/Subway/subway.interface' + + +const router:Router = express.Router(); + +//SubwayStation Name List from DB +function getSubwayStationName(stNm:string, callback:(nameList:Array)=>void){ + try { + + const connection:mysql.connection = db.return_connection(); + + let SQL:string = "Select * FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.STIN_NM like ?; "; + + let nameList:Array = []; + + connection.query(SQL, ["%"+stNm+"%"], function (err:Error, results:any, fields:any) { + if (err) { + console.log(err); + } + + for (let i = 0; i < results.length; i++) { + + nameList.push({ + railCd: results[i].RAIL_OPR_ISTT_CD, + lnCd: results[i].LN_CD, + lnNm: results[i].LN_CD, + stCd: results[i].STIN_CD, + stNm: results[i].STIN_NM, + }) + } + + callback(nameList); + }); + + } + catch (e) { + console.error(e); + callback(e); + } +} + +function getSubwayStationInfo(stCd:string, stNm:string, callback:(stationInfo:SubwayStationInfo)=>void) { + try { + + const connection:mysql.connection = db.return_connection(); + + let sql:string = "Select * FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.stin_cd = ? and a.stin_nm = ?"; + + connection.query(sql, [stCd, stNm], function (err:Error, results:any, fields:any) { + if (err) { + console.log(err); + } + + /* + //NULL error + if (results.length !== 0) { + return callback(); + } + */ + + const url:string = 'https://openapi.kric.go.kr/openapi/convenientInfo/stationInfo'; + let queryParams:string = '?' + encodeURI('serviceKey'); + queryParams += '=' + serviceKey.subwayRailKey; + queryParams += '&' + encodeURI('format') + '=' + encodeURI('json'); + queryParams += '&' + encodeURI('railOprIsttCd'); + queryParams += '=' + encodeURI(results[0].RAIL_OPR_ISTT_CD); + queryParams += '&' + encodeURI('lnCd'); + queryParams += '=' + encodeURI(results[0].LN_CD); + queryParams += '&' + encodeURI('stinCd'); + queryParams += '=' + encodeURI(results[0].STIN_CD); + queryParams += '&' + encodeURI('stinNm'); + queryParams += '=' + encodeURI(results[0].STIN_NM); + + return request({ + url: url + queryParams, + method: 'GET' + }, function (error:Error, response:any, body:string) { + + const stationinfo:SubwayStationInfoRequest = JSON.parse(body).body[0]; + + callback({ + railCd: stationinfo.railOprIsttCd, + lnCd: stationinfo.lnCd, + stCd: stationinfo.stinCd, + stNm: stationinfo.stinNm, + roadNm: stationinfo.roadNmAdr, + tmX: stationinfo.stinLocLon, + tmY: stationinfo.stinLocLat, + wNum: results[0].wnum, + eName: results[0].en_name, + fCode: results[0].f_code + }); + + }); + + }); + + } + catch (e) { + console.error(e); + callback(e); + } +} + +function getLiftPos(stCd:string, stNm:string, railCd:string, lnCd:string, callback:(liftPosInfo:SubwayStationLiftPos|null)=>void) { + try { + + const url:string = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/stationWheelchairLiftLocation'; + let queryParams:string = '?' + encodeURI('serviceKey') + '=' + serviceKey.subwayRailKey; + queryParams += '&' + encodeURI('format') + '=' + encodeURI('json'); + queryParams += '&' + encodeURI('railOprIsttCd') + '=' + encodeURI(railCd); + queryParams += '&' + encodeURI('lnCd') + '=' + encodeURI(lnCd); + queryParams += '&' + encodeURI('stinCd') + '=' + encodeURI(stCd); + + return request({ + url: url + queryParams, + method: 'GET' + }, function (error:Error, response:any, body:any) { + const liftPosInfo:Array = JSON.parse(body).body; + + if(liftPosInfo === undefined){ + callback(null); + } + else callback(liftPosInfo[0]); + + }); + + } + catch (e) { + console.error(e); + callback(e); + } +} + +function getLiftMove(stCd:string, stNm:string, railCd:string, lnCd:string, callback:(liftMoveInfo:Array)=>void) { + try { + + const liftMoveInfo:Array = []; + + const url:string = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/stationWheelchairLiftMovement'; + let queryParams:string = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + + return request({ + url: url + queryParams, + method: 'GET' + }, async function (error:Error, response:any, body:any) { + + //목적지 별로 구분하여 제공 + const liftMoveParse:Array = JSON.parse(body).body; + + let liftInfo:SubwayStationLiftInfo = { + direction: "", + info: [] + }; + + //비동기 처리 + for (let i = 0; i < liftMoveParse.length; i++) { + + + if (liftMoveParse[i].mvTpOrdr === 1) { + if (liftInfo.info.length !== 0) { + const direction:string = liftInfo.info[liftInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + liftInfo.direction = direction; + + liftMoveInfo.push(liftInfo); + liftInfo.direction = ""; + liftInfo.info = []; + } + } + liftInfo.info.push(liftMoveParse[i]); + } + + const direction:string = liftInfo.info[liftInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + liftInfo.direction = direction; + liftMoveInfo.push(liftInfo); + + callback(liftMoveInfo); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} + +function getElevatorPos(stCd:string, stNm:string, railCd:string, lnCd:string, callback:(ElevatorPosInfo:SubwayStationElevatorPosInfo)=>void) { + try { + const url:string = 'https://openapi.kric.go.kr/openapi/convenientInfo/stationElevator'; + + let queryParams:string = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + + return request({ + url: url + queryParams, + method: 'GET' + }, function (error:Error, response:any, body:any) { + const ElevatorPosInfo:SubwayStationElevatorPosInfo = JSON.parse(body).body; + callback(ElevatorPosInfo); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} + + +function getElevatorMove(stCd:string, stNm:string, railCd:string, lnCd:string, callback:(elevatorMove:Array)=>void) { + try { + + const url:string = 'https://openapi.kric.go.kr/openapi/trafficWeekInfo/stinElevatorMovement'; + let queryParams:string = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + + let elevatorMove:Array = []; + + return request({ + url: url + queryParams, + method: 'GET' + }, function (error:Error, response:any, body:any) { + + let elevatorInfo:SubwayStationElevatorMoveInfo = { + direction: "", + info: [] + }; + + const elevatorMoveParse:Array = JSON.parse(body).body; + + for (let i = 0; i < elevatorMoveParse.length; i++) { + if (elevatorMoveParse[i].mvTpOrdr === 1) { + if (elevatorInfo.info.length !== 0) { + const direction:string = elevatorInfo.info[elevatorInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + elevatorInfo.direction = direction; + + elevatorMove.push(elevatorInfo); + elevatorInfo.direction = ""; + elevatorInfo.info = []; + } + } + elevatorInfo.info.push(elevatorMoveParse[i]); + } + + const direction:string = elevatorInfo.info[elevatorInfo.info.length - 2].mvContDtl.split('승강장')[0].substr(3); + elevatorInfo.direction = direction; + + elevatorMove.push(elevatorInfo); + + callback(elevatorMove); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} + +function getTransferList(stCd:string, stNm:string, railCd:string, lnCd:string, callback:(transferList:SubwayStationTransferInfo)=>void) { + try { + + const connection:mysql.connection = db.return_connection(); + + let transferList:SubwayStationTransferInfo = { + sourceStation: [], + transferStation: [] + }; + + + let sql:string = "Select * FROM subcode_1 WHERE (STIN_CD = ? or STIN_CD = ?) and LN_CD = ? and RAIL_OPR_ISTT_CD = ?;"; + + connection.query(sql, [parseInt(stCd) + 1, parseInt(stCd) -1, lnCd, railCd], function (err:Error, results:any, fields:any) { + + if (err) { + console.log(err); + } + + let sourceStation:Array = []; + + /* + if (results.length == 0) { + return callback({ + error: 404, + errorString: "Not Transfer Station" + }); + } + */ + /*else*/ { + for (let i = 0; i < results.length; i++) { + sourceStation.push({ + stCd: results[i].STIN_CD, + stNm: results[i].STIN_NM, + railCd: results[i].RAIL_OPR_ISTT_CD, + lnCd: results[i].LN_CD + }) + } + + } + transferList.sourceStation = sourceStation; + }); + + sql = "Select * FROM subcode_1 WHERE STIN_NM = ?;"; + connection.query(sql, [stNm], function (err:Error, results:any, fields:any) { + + if (err) { + console.log(err); + } + + if (results.length === 1) { + /* + return callback({ + error: 404, + errorString: "Not Transfer Station" + }); + */ + } + + for (let i = 0; i < results.length; i++) { + if (results[i].STIN_CD != stCd) { + const sql2:string = "Select * FROM subcode_1 WHERE (STIN_CD = ? or STIN_CD = ?) and RAIL_OPR_ISTT_CD = ?;"; + connection.query(sql2, [parseInt(results[i].STIN_CD) + 1, parseInt(results[i].STIN_CD) - 1, results[i].RAIL_OPR_ISTT_CD], function (err:Error, results2:any, fields:any) { + let transferStation:Array = []; + + for (let j = 0; j < results2.length; j++) { + transferStation.push({ + stCd: results2[j].STIN_CD, + stNm: results2[j].STIN_NM, + railCd: results2[j].RAIL_OPR_ISTT_CD, + lnCd: results2[j].LN_CD + }) + } + transferList.transferStation = transferStation; + + callback(transferList); + }); + + } + } + }); + + } + + catch (e) { + console.error(e); + callback(e); + } +} + +function getTransferInfo(stCd:string, stNm:string, railCd:string, lnCd:string, prev:string, chthTgtLn:string, chtnNextStinCd:string , callback:(transferInfo:Array)=>void) { + try { + + const connection:mysql.connection = db.return_connection(); + + let sql:string = "Select * FROM subcode_1 WHERE STIN_NM = ? and LN_CD = ?;"; + let transferInfo:Array = []; + + connection.query(sql, [stNm, chthTgtLn], function (err:Error, results:any, fields:any) { + + if (err) { + console.log(err); + } + + let prevStinCd:number; + + if (parseInt(results[0].STIN_CD) + 1 === parseInt(chtnNextStinCd)) { + prevStinCd = parseInt(results[0].STIN_CD) - 1; + } + else { + prevStinCd = parseInt(results[0].STIN_CD) + 1; + } + + const url:string = 'https://openapi.kric.go.kr/openapi/vulnerableUserInfo/transferMovement'; + let queryParams:string = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + queryParams += '&' + encodeURIComponent('prevStinCd') + '=' + encodeURIComponent(prevStinCd); + queryParams += '&' + encodeURIComponent('chthTgtLn') + '=' + encodeURIComponent(chthTgtLn); + queryParams += '&' + encodeURIComponent('chtnNextStinCd') + '=' + encodeURIComponent(chtnNextStinCd); + + //chtnNextStinCd -> 상행선 1,3 + //chtnNextStinCd -> 하행선 2,4 + + //parse Int 어캐해야됨 + //상행 하행 구분 어캐해야됨 + + return request({ + url: url + queryParams, + method: 'GET' + }, function (error:Error, response:any, body:any) { + const parse:Array = JSON.parse(body).body; + for (let i = 0; i < parse.length; i++) { + //성수가 211 하행 + //railCd로 비교 + + //2호선의 경우 상 하행이 반대 + if (railCd === "S1" && lnCd === "2") { + //환승역 방면이 상행선이라면 2, 4만 나옴 + if (prevStinCd > parseInt(chtnNextStinCd)) { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === 2) { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === 1) { + transferInfo.push(parse[i]); + } + } + //하행선인 경우 + else { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === 4) { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === 3) { + transferInfo.push(parse[i]); + } + } + } + else { + //환승역 방면이 상행선이라면 1,3만 나옴 + if (prevStinCd > parseInt(chtnNextStinCd)) { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === 1) { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === 3) { + transferInfo.push(parse[i]); + } + } + //하행선인 경우 + else { + //출발 방면이 상행선이라면 + if (parseInt(stCd) > parseInt(prev) && parse[i].mvPathMgNo === 2) { + transferInfo.push(parse[i]); + } + //출발 방면이 하행선이라면 + else if (parseInt(stCd) < parseInt(prev) && parse[i].mvPathMgNo === 4) { + transferInfo.push(parse[i]); + } + } + } + } + callback(transferInfo); + }); + + }); + + } + + catch (e) { + console.error(e); + callback(e); + } +} + +function getConvenience(stCd:string, stNm:string, railCd:string, lnCd:string, callback:(conveneinceInfo:Array)=>void) { + try { + + const conveneinceInfo:Array = []; + + const url:string = 'https://openapi.kric.go.kr/openapi/handicapped/stationCnvFacl'; + let queryParams:string = '?' + encodeURIComponent('serviceKey'); + queryParams += '=' + serviceKey.subwayRailKey; + queryParams += '&' + encodeURIComponent('format') + '=' + encodeURIComponent('json'); + queryParams += '&' + encodeURIComponent('railOprIsttCd') + '=' + encodeURIComponent(railCd); + queryParams += '&' + encodeURIComponent('lnCd') + '=' + encodeURIComponent(lnCd); + queryParams += '&' + encodeURIComponent('stinCd') + '=' + encodeURIComponent(stCd); + + return request({ + url: url + queryParams, + method: 'GET' + }, function (error:Error, response:any, body:any) { + const parse:Array = JSON.parse(body).body; + + for (let i = 0; i < parse.length; i++) { + if (parse[i].gubun === "EV" || parse[i].gubun === "WCLF") { + conveneinceInfo.push(parse[i]); + } + } + + callback(conveneinceInfo); + }); + } + catch (e) { + console.error(e); + callback(e); + } +} + +router.get('/stNm/:stNm', async (req:Request, res:Response) => { + try { + + const stNm = req.params.stNm; + + await getSubwayStationName(stNm, stationList => { + if (stationList.length === 0) { + return res.status(500).json({ + error: "No Station" + }) + } + else { + return res.status(200).json( + stationList + ) + } + + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }) + } +}) + +router.get('/stationInfo/:stCd/:stNm', async (req:Request, res:Response) => { + try { + + const stCd = req.params.stCd; + const stNm = req.params.stNm; + + await getSubwayStationInfo(stCd, stNm, stationinfo => { + return res.status(200).json({ + stationinfo + }) + }) + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }) + } +}) + +router.get('/liftPos/:stCd/:stNm/:railCd/:lnCd', async (req:Request, res:Response) => { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + + await getLiftPos(stCd, stNm, railCd, lnCd, liftPosInfo => { + + //null인 경우 + if(liftPosInfo===null){ + return res.status(200).json([]); + } + + else{ + return res.status(200).json({ + "railOprIsttCd": liftPosInfo.railOprIsttCd, + "lnCd": liftPosInfo.lnCd, + "stinCd": liftPosInfo.stinCd, + "exitNo": liftPosInfo.exitNo, + "dtlLoc": liftPosInfo.dtlLoc, + "grndDvNmFr": liftPosInfo.grndDvNmFr, + "runStinFlorFr": liftPosInfo.runStinFlorFr, + "grndDvNmTo": liftPosInfo.grndDvNmTo, + "runStinFlorTo": liftPosInfo.runStinFlorTo, + "len": liftPosInfo.len, + "wd": liftPosInfo.wd, + "bndWgt": liftPosInfo.bndWgt + }); + } + }) + + + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }) + } +}) + +router.get('/liftMove/:stCd/:stNm/:railCd/:lnCd', async (req:Request, res:Response) => { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + + await getLiftMove(stCd, stNm, railCd, lnCd, callback=> { + return res.status(200).json(callback); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }) + } +}) + +router.get('/ElevatorPos/:stCd/:stNm/:railCd/:lnCd', async (req:Request, res:Response) => { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + + await getElevatorPos(stCd, stNm, railCd, lnCd, callback => { + return res.status(200).json(callback) + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }) + } +}) + +router.get('/ElevatorMove/:stCd/:stNm/:railCd/:lnCd', async (req:Request, res:Response) => { + try { + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + + await getElevatorMove(stCd, stNm, railCd, lnCd, callback => { + return res.status(200).json(callback); + }); + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }) + } +}) + + +router.get('/transferMove/transferList/:stCd/:stNm/:railCd/:lnCd', async (req:Request, res:Response) => { + try { + + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + + await getTransferList(stCd, stNm, railCd, lnCd, transferInfo => { + if (transferInfo.sourceStation.length === 0 || transferInfo.transferStation.length === 0) { + return res.status(500).json({ + error: 404, + errorString: "Not Transfer Station" + }) + } + return res.status(200).json(transferInfo) + }); + + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }) + } +}); + +router.get('/transferMove/transferInfo/:stCd/:stNm/:railCd/:lnCd/:prevStinCd/:chthTgtLn/:chtnNextStinCd', async (req:Request, res:Response) => { + try { + + const stCd = req.params.stCd; + const stNm = req.params.stNm; + const railCd = req.params.railCd; + const lnCd = req.params.lnCd; + const prevStinCd = req.params.prevStinCd; + const chthTgtLn = req.params.chthTgtLn; + const chtnNextStinCd = req.params.chtnNextStinCd; + + await getTransferInfo(stCd, stNm, railCd, lnCd, prevStinCd, chthTgtLn, chtnNextStinCd, callback => { + + return res.json(callback) + }); + + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }) + } +}); + +router.get('/convenience/:stCd/:stNm/:railCd/:lnCd', async (req:Request, res:Response) => { + try { + const stCd:string = req.params.stCd; + const stNm:string = req.params.stNm; + const railCd:string = req.params.railCd; + const lnCd:string = req.params.lnCd; + + await getConvenience(stCd, stNm, railCd, lnCd, conveneinceInfo => { + + //No Data + if (conveneinceInfo.length === 0) { + return res.status(500).json({ + error: 404, + errorString: "No conveneince" + }) + } + else { + return res.status(200).json(conveneinceInfo); + } + }); + + + } + catch (e) { + console.error(e); + return res.status(500).json({ + error: e, + errorString: e.toString(), + }) + } +}); + +export = router; diff --git a/BackendTS/server.ts b/BackendTS/server.ts index fcc8758..a388469 100644 --- a/BackendTS/server.ts +++ b/BackendTS/server.ts @@ -1,32 +1,35 @@ -const express = require('express'); +import express, { Request, Response } from 'express' const app = express(); const port:number = 3005; -const path = require('path'); -const cors = require('cors') +import path from 'path'; +import cors from 'cors'; +import mysql from 'mysql'; -const db = require('./db'); +import * as db from './db'; db.connect(); -const busRouter = require('./routes/busdata'); -const subwayRouter = require('./routes/subwaydata'); +import busRouter from './routes/busdata'; +import subwayRouter from './routes/subwaydata'; +import navigationRouter from './routes/navigation'; -let corsOptions = { +let corsOptions: cors.CorsOptions = { origin: ['http://localhost:3000/#/', 'http://localhost:3000', 'http://localhost:3005', 'http://34.168.80.42:3000', 'http://172.30.1.35:5000', 'http://localhost:5000'], credentials: true } app.use(cors(corsOptions)); -app.use(express.static(path.join(__dirname, './Frontend/creative/build'))) +app.use(express.static(path.join(__dirname, '../../Backend/Frontend/creative/build'))) app.use('/bus', busRouter); app.use('/subway', subwayRouter); +app.use('/navigation',navigationRouter); -app.get('/', function (req, res) { - res.sendFile(path.join(__dirname, './Frontend/creative/build/index.html')); +app.get('/', (req:Request, res:Response) => { + res.sendFile(path.join(__dirname, '../../Backend/Frontend/creative/build/index.html')); }) -app.get('/', (req, res) => { +app.get('/', (req:Request, res:Response) => { res.json({ success: true, }); @@ -36,8 +39,8 @@ app.listen(port, () => { console.log(`server is listening at localhost:${port}`); }) -//1시간 주기로 MySQL Connection 유지용 쿼리 보내기 +//10분 주기로 MySQL Connection 유지용 쿼리 보내기 const mysql_Connect_Maintenance = setInterval(() => { - const connection = db.return_connection(); + const connection:mysql.connection = db.return_connection(); connection.query("SELECT 1"); -}, 360000); //10분 \ No newline at end of file +}, 360000); //10분 diff --git a/BackendTS/server_copy.ts b/BackendTS/server_copy.ts deleted file mode 100644 index 47eb942..0000000 --- a/BackendTS/server_copy.ts +++ /dev/null @@ -1,45 +0,0 @@ -import express, { Request, Response, Router } from 'express' -const app = express(); -const port:number = 3005; -const path:any = require('path'); -const cors:any = require('cors') - -//const db:any = require('./db'); -//db.connect(); - -//const busRouter:any = require('./routes/busdata'); -//const subwayRouter:any = require('./routes/subwaydata'); - -let corsOptions:any = { - origin: ['http://localhost:3000/#/', 'http://localhost:3000', 'http://localhost:3005', 'http://34.168.80.42:3000', 'http://172.30.1.35:5000', 'http://localhost:5000'], - credentials: true -} - -app.use(cors(corsOptions)); - -app.use(express.static(path.join(__dirname, './Frontend/creative/build'))) - -//app.use('/bus', busRouter); -//app.use('/subway', subwayRouter); - -app.get('/', function (req:any, res:any) { - res.sendFile(path.join(__dirname, './Frontend/creative/build/index.html')); -}) - -app.get('/', (req:any, res:any) => { - res.json({ - success: true, - }); -}); - -app.listen(port, () => { - console.log(`server is listening at localhost:${port}`); -}) - -/* -//1시간 주기로 MySQL Connection 유지용 쿼리 보내기 -const mysql_Connect_Maintenance = setInterval(() => { - const connection:any = db.return_connection(); - connection.query("SELECT 1"); -}, 360000); //10분 -*/ \ No newline at end of file diff --git a/interfaces/Bus/bus.interface.ts b/interfaces/Bus/bus.interface.ts new file mode 100644 index 0000000..2d81a8c --- /dev/null +++ b/interfaces/Bus/bus.interface.ts @@ -0,0 +1,46 @@ +interface Element { + type: string, + name: string, + elements: { + type: string, + text: string + } +} + +export interface BusStationInfo { + arsId: string, + stId: string, + stNm: string, + tmX: string, + tmY: string +} + +export interface BusStationList { + + type: string, + name: string, + elements?: Array +} + +interface BusInfoList { + type: string, + name: string, + elements: Array +} + +export interface BusItemList { + type: string, + name: string, + elements?: Array +} + +export interface BusInfo { + busrouteid: string, + busrouteAbrv: string, + bustype: string, + adirection: string, + nxtStn: string, + arrmsg1: string, + min: string, + sec: string +} \ No newline at end of file diff --git a/interfaces/Navigation/navigation.interface.ts b/interfaces/Navigation/navigation.interface.ts new file mode 100644 index 0000000..4399b00 --- /dev/null +++ b/interfaces/Navigation/navigation.interface.ts @@ -0,0 +1,138 @@ +/*export interface BusPathList { + fid: string, + fname: string, + fx: string, + fy: string, + routeId?: string, + routeNm: string, + tid: string, + tname: string, + tx: string, + ty: string, +} + +export interface SubwayPathList { + routeNm: string, //호선 + fid: string, + fname: string, + fx: string, + fy: string, + tid: string, + tname: string, + tx: string, + ty: string, + railLinkList?: Array, +} + +export interface NavigationList { + distance: string, + pathList: Array|Array, + timeList: Array, + totalTime: string, + walkTime: number +}*/ + +export interface NavigationInfo { + trafficDistance: number, + totalWalk: number, + totalTime: number, + payment: number, + busTransitCount: number, + subwayTransitCount: number, + mapObj: string, + firstStartStation: string, + lastEndStation: string, + totalStationCount: number, + busStationCount :number, + subwayStationCount: number, + totalDistance: number, + totalWalkTime: number, + checkIntervalTime: number, + checkIntervalTimeOverYn: number +} + +interface NavigationLane { + name?: string, + busNo?: string, + type?: number, + busID?: number, + busLocalBlID?: number, + busCityCode?: number, + busProviderCode?: number, + subwayCode?: number, + subwayCityCode?: number +} + +interface StationList{ + index: number, + stationID: number, + stationName: string, + stationCityCode?: number, + stationProviderCode?: number, + localStationID?: string, + arsID?: string, + x: string, + y: string, + isNonStop?: string +} + +interface NavigationPassStopList{ + stations: Array, +} + +interface NavigationSubPath { + trafficType: number, + distance: number, + sectionTime: number, + stationCount?: number, + lane?: Array + startName: string, + startX: number, + startY: number, + endName: string, + endX: number, + endY: number, + way?: string, + wayCode?: number, + door?: string, + startID: number, + startStationCityCode?: number, + startStationProviderCode?: number, + startLocalStationID?: string, + startArsID?: string, + endID: number, + endStationCityCode?: number, + endStationProviderCode?: number, + endLocalStationID?: string, + endArsID?: string, + startExitNo?: string, + startExitX?: number, + startExitY?: number, + endExitNo?: number, + endExitX?: number, + endExitY?: number, + passStopList: NavigationPassStopList +} + +export interface NavigationPath { + pathType: number, + pathClass?: string, + info: NavigationInfo, + subPath: Array +} + +export interface NavigationResult { + searchType: number, + outTrafficCheck: number, + busCount: number, + subwayCount: number, + subwayBusCount: number, + pointDistance: number, + startRadius: number, + endRadius: number, + path: Array +} + +export interface RecommendPathList { + test: string +} \ No newline at end of file diff --git a/interfaces/Subway/subway.interface.ts b/interfaces/Subway/subway.interface.ts new file mode 100644 index 0000000..49839d3 --- /dev/null +++ b/interfaces/Subway/subway.interface.ts @@ -0,0 +1,142 @@ +export interface SubwayStationNameList { + railCd: string, + lnCd: string, + lnNm?: string, + stCd: string, + stNm: string +} + +export interface SubwayStationInfo { + railCd: string, + lnCd: string + stCd: string + stNm: string + roadNm: string + tmX: string + tmY: string, + wNum: string + eName: string + fCode: string +} + +export interface SubwayStationInfoRequest { + lnCd: string, + lonmAdr?: string, + mapCordX?: string, + mapCordY?: string, + railOprIsttCd: string, + roadNmAdr: string, + stinCd: string, + stinLocLat: string, + stinLocLon: string, + stinNm: string, + stinNmEng?: string, + stinNmJpn?: string, + stinNmRom?: string, + stinNmSimpcina?: string, + stinNmTradcina?: string, + strkZone?: string +} + +export interface SubwayStationLiftPos { + bndWgt?: string, + dtlLoc?: string, + exitNo?: string, + grndDvNmFr?: string, + grndDvNmTo?: string, + len?: string, + lnCd?: string, + railOprIsttCd?: string, + runStinFlorFr?: string, + runStinFlorTo?: string, + stinCd?: string, + wd?: string +} + +export interface SubwayStationLiftMove { + lnCd: string, + mvContDtl: string, + mvDst: string, + mvPathDvCd: string, + mvPathDvNm: string, + mvPathMgNo: number, + mvTpOrdr: number, + railOprIsttCd: string, + stinCd: string, +} + +export interface SubwayStationLiftInfo { + direction: string, + info?: Array +} + +export interface SubwayStationElevatorPosInfo { + dtlLoc: string, + exitNo: string, + grndDvNmFr: string, + grndDvNmTo: string, + lnCd: string, + railOprIsttCd: string, + rglnPsno: string, + rglnWgt: string, + runStinFlorFr: string, + runStinFlorTo: string, + stinCd: string +} + +export interface SubwayStationElevatorMove { + lnCd: string, + mvContDtl: string, + mvDst: string, + mvPathDvCd: string, + mvPathDvNm: string, + mvPathMgNo: string, + mvTpOrdr: number, + railOprIsttCd: string, + stinCd: string, +} + +export interface SubwayStationElevatorMoveInfo { + direction: string, + info?: Array +} + +export interface SubwayStationTransferStationInfo { + stCd: string, + stNm: string, + railCd: string, + lnCd: string, +} + +export interface SubwayStationTransferInfo { + sourceStation: Array, + transferStation: Array +} + +export interface SubwayStationTransferMoveList { + chtnMvTpOrdr: string, + edMovePath: string, + elvtSttCd: string, + elvtTpCd: string, + imgPath: string, + mvContDtl: string, + mvPathMgNo: number, + stMovePath: string +} + +export interface SubwayStationConvenience { + dtlLoc: string, + grndDvCd: string, + gubun: string, + imgPath: string, + mlFmlDvCd: string, + stinFlor: string, + trfcWeakDvCd: string +} + +export interface SubwayStationConvenienceInfo { + /* + EV: Array, + WCLF: Array + */ +} \ No newline at end of file diff --git a/interfaces/index.ts b/interfaces/index.ts new file mode 100644 index 0000000..d45bed7 --- /dev/null +++ b/interfaces/index.ts @@ -0,0 +1 @@ +export * from './Bus/bus.interface'; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index a56d1fe..0be13df 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,5 +4,8 @@ "module": "commonjs", "outDir": "./BackendJS", "esModuleInterop": true, - } + "resolveJsonModule": true + }, + "include": ["BackendTS/**/*"], + } \ No newline at end of file