From 27ee9797009315f49690905d5fa69147c553e94c Mon Sep 17 00:00:00 2001 From: priyanshu-kun Date: Sat, 1 Apr 2023 18:54:11 +0530 Subject: [PATCH 01/11] Create a dummy app for openapi web search project --- Dummy App/README.md | 1 + Dummy App/client/.env | 1 + Dummy App/client/.gitignore | 24 + Dummy App/client/index.html | 117 +++ Dummy App/client/javascript.svg | 1 + Dummy App/client/main.js | 58 ++ Dummy App/client/package.json | 17 + Dummy App/client/public/logo.svg | 1 + Dummy App/client/public/vite.svg | 1 + Dummy App/client/style.css | 96 +++ Dummy App/client/yarn.lock | 284 +++++++ Dummy App/server/.gitignore | 2 + Dummy App/server/index.js | 50 ++ Dummy App/server/package.json | 16 + Dummy App/server/services/crawling.service.js | 112 +++ Dummy App/server/services/cronjob.service.js | 76 ++ Dummy App/server/services/indexing.service.js | 50 ++ Dummy App/server/services/search.service.js | 27 + Dummy App/server/yarn.lock | 695 ++++++++++++++++++ 19 files changed, 1629 insertions(+) create mode 100644 Dummy App/README.md create mode 100644 Dummy App/client/.env create mode 100644 Dummy App/client/.gitignore create mode 100644 Dummy App/client/index.html create mode 100644 Dummy App/client/javascript.svg create mode 100644 Dummy App/client/main.js create mode 100644 Dummy App/client/package.json create mode 100644 Dummy App/client/public/logo.svg create mode 100644 Dummy App/client/public/vite.svg create mode 100644 Dummy App/client/style.css create mode 100644 Dummy App/client/yarn.lock create mode 100644 Dummy App/server/.gitignore create mode 100644 Dummy App/server/index.js create mode 100644 Dummy App/server/package.json create mode 100644 Dummy App/server/services/crawling.service.js create mode 100644 Dummy App/server/services/cronjob.service.js create mode 100644 Dummy App/server/services/indexing.service.js create mode 100644 Dummy App/server/services/search.service.js create mode 100644 Dummy App/server/yarn.lock diff --git a/Dummy App/README.md b/Dummy App/README.md new file mode 100644 index 0000000..445c09c --- /dev/null +++ b/Dummy App/README.md @@ -0,0 +1 @@ +# Dummy openapi web search \ No newline at end of file diff --git a/Dummy App/client/.env b/Dummy App/client/.env new file mode 100644 index 0000000..c1ae9ae --- /dev/null +++ b/Dummy App/client/.env @@ -0,0 +1 @@ +VITE_SERVER_URL=http://localhost:8081 \ No newline at end of file diff --git a/Dummy App/client/.gitignore b/Dummy App/client/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/Dummy App/client/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/Dummy App/client/index.html b/Dummy App/client/index.html new file mode 100644 index 0000000..9a8e31e --- /dev/null +++ b/Dummy App/client/index.html @@ -0,0 +1,117 @@ + + + + + + + + + + + + OpenAPI Web Search + + + +
+ +

Dummy OpenAPI Web Search

+
+
+ + +
+ +
+

Note -

+

These URLs are part of a set of test cases I've prepared for evaluating the search + functionality of our app, which allows users to search for documents based on keywords. Feel free to try out + these URLs content as keywords in the dummy app and see how the search algorithm performs.

+ +
+ + + diff --git a/Dummy App/client/javascript.svg b/Dummy App/client/javascript.svg new file mode 100644 index 0000000..f9abb2b --- /dev/null +++ b/Dummy App/client/javascript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Dummy App/client/main.js b/Dummy App/client/main.js new file mode 100644 index 0000000..79ad084 --- /dev/null +++ b/Dummy App/client/main.js @@ -0,0 +1,58 @@ +import './style.css' +import axios from "axios" +const input = document.getElementById("search_field"); +const button = document.querySelector(".search_button") +const searchResults = document.querySelector(".results"); +let query = "" +input.value = query; + + + +function renderResults(data) { + if(data.length === 0) { + searchResults.innerHTML = "NOT FOUND!" + return; + } + let output = ``; + data.forEach(d => { + output += d; + }) + searchResults.innerHTML = output + searchResults.style.textAlign = "left"; +} + +function makeOutput(data) { + const results = data.map(d => `
  • ${d._source.body.url}
  • `); + renderResults(results) +} + + +async function makeSearch() { + try { + const response = await axios.get(`${import.meta.env.VITE_SERVER_URL}/search`,{ + params: { + q: query + } + }) + makeOutput(response.data) + } + catch(e) { + console.error("Something got wrong.",e) + } +} + + +input.addEventListener("input",(e) => { + query = e.target.value; +}) + +button.addEventListener("click",(e) => { + e.preventDefault() + if(query === "") { + alert("Input cannot be empty!") + return; + } + makeSearch(); + input.value = "" + query = "" +}) diff --git a/Dummy App/client/package.json b/Dummy App/client/package.json new file mode 100644 index 0000000..fa6b7a8 --- /dev/null +++ b/Dummy App/client/package.json @@ -0,0 +1,17 @@ +{ + "name": "client", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "vite": "^4.2.0" + }, + "dependencies": { + "axios": "^1.3.4" + } +} diff --git a/Dummy App/client/public/logo.svg b/Dummy App/client/public/logo.svg new file mode 100644 index 0000000..50ee1e3 --- /dev/null +++ b/Dummy App/client/public/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Dummy App/client/public/vite.svg b/Dummy App/client/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/Dummy App/client/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Dummy App/client/style.css b/Dummy App/client/style.css new file mode 100644 index 0000000..a57f331 --- /dev/null +++ b/Dummy App/client/style.css @@ -0,0 +1,96 @@ +body { + font-family: 'Inter', sans-serif; + font-weight: 500; + padding-bottom: 60px; +} + +.app_header { + width: fit-content; + height: 300px; + margin: 100px auto 20px auto; +} + +.app_header_logo { + width: 200px; + height: auto; + display: block; + margin: auto; +} + +.app_header_title { + font-weight: 900; + font-size: 40px; + color: rgb(46, 46, 46); +} + +.search_form { + margin: 10px auto 20px auto; + width: fit-content; + display: flex; + align-items: center; + justify-content: center; +} + +.note { + padding: 30px; + border-radius: 30px; + background-color: rgb(254, 224, 224); + margin: 0 auto; + width: 800px; + border: 1px solid rgb(209, 49, 49); +} + +.results { + margin: 40px auto; + width: 800px; + background-color: rgb(242, 242, 242); + border-radius: 30px; + padding: 30px 60px; + text-align: center; +} + +.note_message { + font-size: 0.8rem; + color: rgb(255, 86, 86); + width: 80%; + margin: 20px 0; +} + +.note_list_items { + margin-bottom: 6px; +} + +#search_field { + font-size: 1.2rem; + border-radius: 30px; + border: 3px solid black; + display: inline-block; + width: 400px; + padding: 12px 30px; + margin-right: 10px; +} + +#search_field::placeholder { + font-size: 0.8rem; +} + +.search_button { + padding: 12px 20px; + font-size: 1rem; + border-radius: 10px; + border: none; + background-color: black; + color: white; + cursor: pointer; + box-shadow: 2px 3px 6px 0 rgba(0,0,0,0.3); + transition: all 0.3s ease; +} + +.search_button:hover { + text-decoration: underline; + transform: translateY(-1px); +} + +.search_button:active { + transform: scale(0.97); +} \ No newline at end of file diff --git a/Dummy App/client/yarn.lock b/Dummy App/client/yarn.lock new file mode 100644 index 0000000..a077bc3 --- /dev/null +++ b/Dummy App/client/yarn.lock @@ -0,0 +1,284 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@esbuild/android-arm64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.14.tgz#4624cea3c8941c91f9e9c1228f550d23f1cef037" + integrity sha512-eLOpPO1RvtsP71afiFTvS7tVFShJBCT0txiv/xjFBo5a7R7Gjw7X0IgIaFoLKhqXYAXhahoXm7qAmRXhY4guJg== + +"@esbuild/android-arm@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.14.tgz#74fae60fcab34c3f0e15cb56473a6091ba2b53a6" + integrity sha512-0CnlwnjDU8cks0yJLXfkaU/uoLyRf9VZJs4p1PskBr2AlAHeEsFEwJEo0of/Z3g+ilw5mpyDwThlxzNEIxOE4g== + +"@esbuild/android-x64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.14.tgz#f002fbc08d5e939d8314bd23bcfb1e95d029491f" + integrity sha512-nrfQYWBfLGfSGLvRVlt6xi63B5IbfHm3tZCdu/82zuFPQ7zez4XjmRtF/wIRYbJQ/DsZrxJdEvYFE67avYXyng== + +"@esbuild/darwin-arm64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.14.tgz#b8dcd79a1dd19564950b4ca51d62999011e2e168" + integrity sha512-eoSjEuDsU1ROwgBH/c+fZzuSyJUVXQTOIN9xuLs9dE/9HbV/A5IqdXHU1p2OfIMwBwOYJ9SFVGGldxeRCUJFyw== + +"@esbuild/darwin-x64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.14.tgz#4b49f195d9473625efc3c773fc757018f2c0d979" + integrity sha512-zN0U8RWfrDttdFNkHqFYZtOH8hdi22z0pFm0aIJPsNC4QQZv7je8DWCX5iA4Zx6tRhS0CCc0XC2m7wKsbWEo5g== + +"@esbuild/freebsd-arm64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.14.tgz#480923fd38f644c6342c55e916cc7c231a85eeb7" + integrity sha512-z0VcD4ibeZWVQCW1O7szaLxGsx54gcCnajEJMdYoYjLiq4g1jrP2lMq6pk71dbS5+7op/L2Aod+erw+EUr28/A== + +"@esbuild/freebsd-x64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.14.tgz#a6b6b01954ad8562461cb8a5e40e8a860af69cbe" + integrity sha512-hd9mPcxfTgJlolrPlcXkQk9BMwNBvNBsVaUe5eNUqXut6weDQH8whcNaKNF2RO8NbpT6GY8rHOK2A9y++s+ehw== + +"@esbuild/linux-arm64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.14.tgz#1fe2f39f78183b59f75a4ad9c48d079916d92418" + integrity sha512-FhAMNYOq3Iblcj9i+K0l1Fp/MHt+zBeRu/Qkf0LtrcFu3T45jcwB6A1iMsemQ42vR3GBhjNZJZTaCe3VFPbn9g== + +"@esbuild/linux-arm@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.14.tgz#18d594a49b64e4a3a05022c005cb384a58056a2a" + integrity sha512-BNTl+wSJ1omsH8s3TkQmIIIQHwvwJrU9u1ggb9XU2KTVM4TmthRIVyxSp2qxROJHhZuW/r8fht46/QE8hU8Qvg== + +"@esbuild/linux-ia32@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.14.tgz#f7f0182a9cfc0159e0922ed66c805c9c6ef1b654" + integrity sha512-91OK/lQ5y2v7AsmnFT+0EyxdPTNhov3y2CWMdizyMfxSxRqHazXdzgBKtlmkU2KYIc+9ZK3Vwp2KyXogEATYxQ== + +"@esbuild/linux-loong64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.14.tgz#5f5305fdffe2d71dd9a97aa77d0c99c99409066f" + integrity sha512-vp15H+5NR6hubNgMluqqKza85HcGJgq7t6rMH7O3Y6ApiOWPkvW2AJfNojUQimfTp6OUrACUXfR4hmpcENXoMQ== + +"@esbuild/linux-mips64el@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.14.tgz#a602e85c51b2f71d2aedfe7f4143b2f92f97f3f5" + integrity sha512-90TOdFV7N+fgi6c2+GO9ochEkmm9kBAKnuD5e08GQMgMINOdOFHuYLPQ91RYVrnWwQ5683sJKuLi9l4SsbJ7Hg== + +"@esbuild/linux-ppc64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.14.tgz#32d918d782105cbd9345dbfba14ee018b9c7afdf" + integrity sha512-NnBGeoqKkTugpBOBZZoktQQ1Yqb7aHKmHxsw43NddPB2YWLAlpb7THZIzsRsTr0Xw3nqiPxbA1H31ZMOG+VVPQ== + +"@esbuild/linux-riscv64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.14.tgz#38612e7b6c037dff7022c33f49ca17f85c5dec58" + integrity sha512-0qdlKScLXA8MGVy21JUKvMzCYWovctuP8KKqhtE5A6IVPq4onxXhSuhwDd2g5sRCzNDlDjitc5sX31BzDoL5Fw== + +"@esbuild/linux-s390x@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.14.tgz#4397dff354f899e72fd035d72af59a700c465ccb" + integrity sha512-Hdm2Jo1yaaOro4v3+6/zJk6ygCqIZuSDJHdHaf8nVH/tfOuoEX5Riv03Ka15LmQBYJObUTNS1UdyoMk0WUn9Ww== + +"@esbuild/linux-x64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.14.tgz#6c5cb99891b6c3e0c08369da3ef465e8038ad9c2" + integrity sha512-8KHF17OstlK4DuzeF/KmSgzrTWQrkWj5boluiiq7kvJCiQVzUrmSkaBvcLB2UgHpKENO2i6BthPkmUhNDaJsVw== + +"@esbuild/netbsd-x64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.14.tgz#5fa5255a64e9bf3947c1b3bef5e458b50b211994" + integrity sha512-nVwpqvb3yyXztxIT2+VsxJhB5GCgzPdk1n0HHSnchRAcxqKO6ghXwHhJnr0j/B+5FSyEqSxF4q03rbA2fKXtUQ== + +"@esbuild/openbsd-x64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.14.tgz#74d14c79dcb6faf446878cc64284aa4e02f5ca6f" + integrity sha512-1RZ7uQQ9zcy/GSAJL1xPdN7NDdOOtNEGiJalg/MOzeakZeTrgH/DoCkbq7TaPDiPhWqnDF+4bnydxRqQD7il6g== + +"@esbuild/sunos-x64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.14.tgz#5c7d1c7203781d86c2a9b2ff77bd2f8036d24cfa" + integrity sha512-nqMjDsFwv7vp7msrwWRysnM38Sd44PKmW8EzV01YzDBTcTWUpczQg6mGao9VLicXSgW/iookNK6AxeogNVNDZA== + +"@esbuild/win32-arm64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.14.tgz#dc36ed84f1390e73b6019ccf0566c80045e5ca3d" + integrity sha512-xrD0mccTKRBBIotrITV7WVQAwNJ5+1va6L0H9zN92v2yEdjfAN7864cUaZwJS7JPEs53bDTzKFbfqVlG2HhyKQ== + +"@esbuild/win32-ia32@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.14.tgz#0802a107afa9193c13e35de15a94fe347c588767" + integrity sha512-nXpkz9bbJrLLyUTYtRotSS3t5b+FOuljg8LgLdINWFs3FfqZMtbnBCZFUmBzQPyxqU87F8Av+3Nco/M3hEcu1w== + +"@esbuild/win32-x64@0.17.14": + version "0.17.14" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.14.tgz#e81fb49de05fed91bf74251c9ca0343f4fc77d31" + integrity sha512-gPQmsi2DKTaEgG14hc3CHXHp62k8g6qr0Pas+I4lUxRMugGSATh/Bi8Dgusoz9IQ0IfdrvLpco6kujEIBoaogA== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +axios@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.4.tgz#f5760cefd9cfb51fd2481acf88c05f67c4523024" + integrity sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ== + dependencies: + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +esbuild@^0.17.5: + version "0.17.14" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.14.tgz#d61a22de751a3133f3c6c7f9c1c3e231e91a3245" + integrity sha512-vOO5XhmVj/1XQR9NQ1UPq6qvMYL7QFJU57J5fKBKBKxp17uDt5PgxFDb4A2nEiXhr1qQs4x0F5+66hVVw4ruNw== + optionalDependencies: + "@esbuild/android-arm" "0.17.14" + "@esbuild/android-arm64" "0.17.14" + "@esbuild/android-x64" "0.17.14" + "@esbuild/darwin-arm64" "0.17.14" + "@esbuild/darwin-x64" "0.17.14" + "@esbuild/freebsd-arm64" "0.17.14" + "@esbuild/freebsd-x64" "0.17.14" + "@esbuild/linux-arm" "0.17.14" + "@esbuild/linux-arm64" "0.17.14" + "@esbuild/linux-ia32" "0.17.14" + "@esbuild/linux-loong64" "0.17.14" + "@esbuild/linux-mips64el" "0.17.14" + "@esbuild/linux-ppc64" "0.17.14" + "@esbuild/linux-riscv64" "0.17.14" + "@esbuild/linux-s390x" "0.17.14" + "@esbuild/linux-x64" "0.17.14" + "@esbuild/netbsd-x64" "0.17.14" + "@esbuild/openbsd-x64" "0.17.14" + "@esbuild/sunos-x64" "0.17.14" + "@esbuild/win32-arm64" "0.17.14" + "@esbuild/win32-ia32" "0.17.14" + "@esbuild/win32-x64" "0.17.14" + +follow-redirects@^1.15.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +is-core-module@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" + integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== + dependencies: + has "^1.0.3" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +nanoid@^3.3.4: + version "3.3.6" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" + integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +postcss@^8.4.21: + version "8.4.21" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" + integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + +resolve@^1.22.1: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +rollup@^3.18.0: + version "3.20.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.20.2.tgz#f798c600317f216de2e4ad9f4d9ab30a89b690ff" + integrity sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg== + optionalDependencies: + fsevents "~2.3.2" + +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +vite@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.2.1.tgz#6c2eb337b0dfd80a9ded5922163b94949d7fc254" + integrity sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg== + dependencies: + esbuild "^0.17.5" + postcss "^8.4.21" + resolve "^1.22.1" + rollup "^3.18.0" + optionalDependencies: + fsevents "~2.3.2" diff --git a/Dummy App/server/.gitignore b/Dummy App/server/.gitignore new file mode 100644 index 0000000..307beae --- /dev/null +++ b/Dummy App/server/.gitignore @@ -0,0 +1,2 @@ +/.env +/node_modules \ No newline at end of file diff --git a/Dummy App/server/index.js b/Dummy App/server/index.js new file mode 100644 index 0000000..3ed68b8 --- /dev/null +++ b/Dummy App/server/index.js @@ -0,0 +1,50 @@ +const express = require("express") +require("dotenv").config() +const app = express() +const { Client } = require('@elastic/elasticsearch') +const { startCronJob } = require("./services/cronjob.service") +const fs = require("fs") +const { searchOpenAPI } = require("./services/search.service") +const cors = require("cors") +app.use(cors()) +const client = new Client({ + cloud: { + id: process.env.ELASTIC_CLOUD, + }, + auth: { + username: process.env.ELASTIC_USERNAME, + password: process.env.ELASTIC_PASSWORD + } +}) + +client.ping().then(res => { + console.log("DB connected successfully!") +}) +.catch(e => { + console.log("Failed to connect!",e) +}) + + +// startCronJob(client) + + +app.get("/",(req,res) => { + res.json({ + "msg": "It's working" + }) +}) + +app.get('/search', async (req, res) => { + try { + const response = await searchOpenAPI(client,req.query.q); + res.json(response) + } + catch(e) { + console.log(e) + } +}) + +const port = 8081 +app.listen(port, () => { + console.log(`App listening on port ${port}`) +}) \ No newline at end of file diff --git a/Dummy App/server/package.json b/Dummy App/server/package.json new file mode 100644 index 0000000..620efc5 --- /dev/null +++ b/Dummy App/server/package.json @@ -0,0 +1,16 @@ +{ + "name": "server", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "dependencies": { + "axios": "^1.3.4", + "cheerio": "^1.0.0-rc.12", + "cors": "^2.8.5", + "dotenv": "^16.0.3", + "express": "^4.18.2", + "node-cron": "^3.0.2", + "swagger-parser": "^10.0.3", + "zlib": "^1.0.5" + } +} diff --git a/Dummy App/server/services/crawling.service.js b/Dummy App/server/services/crawling.service.js new file mode 100644 index 0000000..b8e4ab8 --- /dev/null +++ b/Dummy App/server/services/crawling.service.js @@ -0,0 +1,112 @@ +const axios = require("axios") +const cheerio = require("cheerio") +const readline = require("readline") +const fs = require("fs") +const zlib = require("zlib") + + +class Crawling { + async downloadFile(url, path) { + const response = await axios({ + url, + method: 'GET', + responseType: 'stream', + onDownloadProgress: function (progressEvent) { + const total = progressEvent.total; + const downloaded = progressEvent.loaded; + + const percent = Math.round((downloaded / total) * 100); + + process.stdout.clearLine(); + process.stdout.cursorTo(0); + process.stdout.write(`Downloading: ${percent}% (${downloaded}/${total} bytes)`); + } + }); + + const fileStream = fs.createWriteStream(path); + response.data.pipe(zlib.createGunzip()).pipe(fileStream); + + return new Promise((resolve, reject) => { + fileStream.on('close', () => { + resolve(); + }); + + fileStream.on('error', (err) => { + reject(err); + }); + }); + } + + async getDataFromFiles(url) { + try { + const response = await axios.get(url, { responseType: 'stream' }); + const gunzip = zlib.createGunzip(); + const lines = readline.createInterface({ input: response.data.pipe(gunzip) }); + + const links = []; + + for await (const line of lines) { + const regex = /\.gz$/; + if (!regex.test(line)) { + continue; + } + links.push(`https://data.commoncrawl.org/${line}`); + } + + return links; + } catch (e) { + // handle errors gracefully + console.log(e); + } + } + async removeFile(url) { + try { + fs.unlink(url, (err) => { + if (err) throw err; + console.log('File deleted!'); + }); + } + catch (e) { + console.log(e) + } + } + async getDataFromCommomCrawlServer(url) { + try { + const links = []; + const { data } = await axios.get(url); + const html = data; + const $ = await cheerio.load(html); + $('tbody tr').each((index, row) => { + const linkTd = $(row).find('td:last-child'); + const link = linkTd.find('a').attr('href'); + links.push(link) + }); + return links; + } + catch (e) { + // handle errors gracefully + console.log(e) + } + } + parsing(text) { + const urlRegex = /http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+/gi; + const matchUrls = text.match(urlRegex) + const parsedUrls = []; + if (matchUrls) { + const keywordReg = /^(?:https?:\/\/)?[^\/\s]+(?:\/[^\/\s]+)*(?:\/(openapi|swagger))(?:\/[^\/\s]*)*$/gi; + const subDomainReg = /^(?:https?:\/\/)?api\.[^\/\s]+\.[^\/\s]+(?:\/[^\/\s]*)*$/gi; + matchUrls.forEach(url => { + const tokens = url.split('/'); + const ext = tokens[tokens.length - 1]; + const rg = /^(openapi|swagger)\.(json|yaml|yml)(\?[\w=&]+)?$/ + if (keywordReg.test(url) || rg.test(ext)) { + parsedUrls.push(url) + } + }) + } + if(parsedUrls.length !== 0) + return parsedUrls; + } +} + +module.exports = new Crawling() \ No newline at end of file diff --git a/Dummy App/server/services/cronjob.service.js b/Dummy App/server/services/cronjob.service.js new file mode 100644 index 0000000..94db517 --- /dev/null +++ b/Dummy App/server/services/cronjob.service.js @@ -0,0 +1,76 @@ +const cron = require("node-cron") +const fs = require("fs") +const CHUNK_SIZE = 1024 * 1024 * 1; // 1 MB chunk size +const URL = "https://index.commoncrawl.org/" +const { getDataFromCommomCrawlServer, getDataFromFiles, downloadFile, removeFile, parsing } = require("./crawling.service"); +const { bulkIndexOpenAPIs } = require("./indexing.service"); +const urlsForIndexing = []; + + +function readContent(client,links, idx) { + if (idx < links.length) { + downloadFile(links[idx], './data/output.txt') + .then(async () => { + const readStream = fs + .createReadStream('./data/output.txt', + { highWaterMark: CHUNK_SIZE }); + readStream.on('data', chunk => { + const text = chunk.toString(); + const parsedUrls = parsing(text) + if(parsedUrls !== undefined) { + urlsForIndexing.push(parsedUrls) + } + }); + + readStream.on('end', () => { + removeFile("./data/output.txt").then((res) => { + const flattedUrlsFroIndexing = urlsForIndexing.flat() + console.log(flattedUrlsFroIndexing) + bulkIndexOpenAPIs(client,flattedUrlsFroIndexing).then(res => { + readContent(client,links, idx + 1); + }) + .catch(e => { + console.error('Error while Indexing: ',e); + return; + }) + }).catch(e => { + console.error('Error while deleting file:', e) + return; + }) + }); + + readStream.on('error', err => { + console.error(err); + return; + }); + }) + .catch((err) => { + console.error('Error downloading file:', err) + return; + }); + } + +} + + +class Cron { + startCronJob(client) { + getDataFromCommomCrawlServer(URL).then(async res => { + const ccFilesPromises = res.map(async r => await getDataFromFiles(r)); + const results = await Promise.all(ccFilesPromises); + const links = results.flat() + readContent(client,links, 0) + }) + cron.schedule('0 0 * * 0', () => { + getDataFromCommomCrawlServer(URL).then(async res => { + const ccFilesPromises = res.map(async r => await getDataFromFiles(r)); + const results = await Promise.all(ccFilesPromises); + const links = results.flat() + readContent(client,links, 0) + }) + + }) + } +} + +module.exports = new Cron() \ No newline at end of file diff --git a/Dummy App/server/services/indexing.service.js b/Dummy App/server/services/indexing.service.js new file mode 100644 index 0000000..e8b9be4 --- /dev/null +++ b/Dummy App/server/services/indexing.service.js @@ -0,0 +1,50 @@ +const axios = require("axios") +const SwaggerParser = require("swagger-parser") + +class Indexing { + async bulkIndexOpenAPIs(client, urls) { + // Create an array of bulk index actions for each OpenAPI document + const bulkActions = []; + + for (const url of urls) { + try { + const response = await axios.get(url); + const tokens = url.split('/'); + const ext = tokens[tokens.length - 1]; + const rg = /^(openapi|swagger)\.(json|yaml|yml)(\?[\w=&]+)?$/ + let document = null; + if(rg.test(ext)) { + document = await SwaggerParser.parse(response.data); + } + + bulkActions.push({ + index: { _index: 'openapi_docs' }, + body: { + url, + content: response.data, + contentType: response.headers['content-type'], + info: document?.info, + description: document?.description, + tags: document?.tags + } + }); + console.log("Done: ",url) + } + catch (e) { + console.log("Address not found!"); + } + } + + const result = await client.helpers.bulk({ + datasource: bulkActions, + onDocument() { + return { + index: { _index: 'openapi_docs' } + } + } + }); + } +} + + +module.exports = new Indexing() \ No newline at end of file diff --git a/Dummy App/server/services/search.service.js b/Dummy App/server/services/search.service.js new file mode 100644 index 0000000..a40b067 --- /dev/null +++ b/Dummy App/server/services/search.service.js @@ -0,0 +1,27 @@ +class Search { + async searchOpenAPI(client, keyword) { + try { + const response = await client.search({ + index: 'openapi_docs', + body: { + query: { + bool: { + must: [ + { match: { "body.content": keyword } } + ] + } + } + } + }); + if (response.hits.total.value === 0) { + throw new Error() + } + return response.hits.hits + } catch (error) { + return []; + } + } + +} + +module.exports = new Search() \ No newline at end of file diff --git a/Dummy App/server/yarn.lock b/Dummy App/server/yarn.lock new file mode 100644 index 0000000..6171182 --- /dev/null +++ b/Dummy App/server/yarn.lock @@ -0,0 +1,695 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@apidevtools/json-schema-ref-parser@^9.0.6": + version "9.1.2" + resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.1.2.tgz#8ff5386b365d4c9faa7c8b566ff16a46a577d9b8" + integrity sha512-r1w81DpR+KyRWd3f+rk6TNqMgedmAxZP5v5KWlXQWlgMUUtyEJch0DKEci1SorPMiSeM8XPl7MZ3miJ60JIpQg== + dependencies: + "@jsdevtools/ono" "^7.1.3" + "@types/json-schema" "^7.0.6" + call-me-maybe "^1.0.1" + js-yaml "^4.1.0" + +"@apidevtools/openapi-schemas@^2.0.4": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz#9fa08017fb59d80538812f03fc7cac5992caaa17" + integrity sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ== + +"@apidevtools/swagger-methods@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz#b789a362e055b0340d04712eafe7027ddc1ac267" + integrity sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg== + +"@apidevtools/swagger-parser@10.0.3": + version "10.0.3" + resolved "https://registry.yarnpkg.com/@apidevtools/swagger-parser/-/swagger-parser-10.0.3.tgz#32057ae99487872c4dd96b314a1ab4b95d89eaf5" + integrity sha512-sNiLY51vZOmSPFZA5TF35KZ2HbgYklQnTSDnkghamzLb3EkNtcQnrBQEj5AOCxHpTtXpqMCRM1CrmV2rG6nw4g== + dependencies: + "@apidevtools/json-schema-ref-parser" "^9.0.6" + "@apidevtools/openapi-schemas" "^2.0.4" + "@apidevtools/swagger-methods" "^3.0.2" + "@jsdevtools/ono" "^7.1.3" + call-me-maybe "^1.0.1" + z-schema "^5.0.1" + +"@jsdevtools/ono@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" + integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== + +"@types/json-schema@^7.0.6": + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +axios@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.4.tgz#f5760cefd9cfb51fd2481acf88c05f67c4523024" + integrity sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ== + dependencies: + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + +body-parser@1.20.1: + version "1.20.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" + 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" + +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +call-me-maybe@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz#03f964f19522ba643b1b0693acb9152fe2074baa" + integrity sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ== + +cheerio-select@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" + integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== + dependencies: + boolbase "^1.0.0" + css-select "^5.1.0" + css-what "^6.1.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + +cheerio@^1.0.0-rc.12: + version "1.0.0-rc.12" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" + integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== + dependencies: + cheerio-select "^2.1.0" + dom-serializer "^2.0.0" + domhandler "^5.0.3" + domutils "^3.0.1" + htmlparser2 "^8.0.1" + parse5 "^7.0.0" + parse5-htmlparser2-tree-adapter "^7.0.0" + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@^9.4.1: + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== + +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@~1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== + +cors@^2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +css-select@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" + integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== + dependencies: + boolbase "^1.0.0" + css-what "^6.1.0" + domhandler "^5.0.2" + domutils "^3.0.1" + nth-check "^2.0.1" + +css-what@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +dom-serializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" + integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.2" + entities "^4.2.0" + +domelementtype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@^5.0.1, domhandler@^5.0.2, domhandler@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" + integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== + dependencies: + domelementtype "^2.3.0" + +domutils@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.0.1.tgz#696b3875238338cb186b6c0612bd4901c89a4f1c" + integrity sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q== + dependencies: + dom-serializer "^2.0.0" + domelementtype "^2.3.0" + domhandler "^5.0.1" + +dotenv@^16.0.3: + version "16.0.3" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" + integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +entities@^4.2.0, entities@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" + integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +express@^4.18.2: + version "4.18.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" + 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" + +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + 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" + +follow-redirects@^1.15.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +get-intrinsic@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" + integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +htmlparser2@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" + integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + entities "^4.4.0" + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + 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" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +inherits@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +lodash.get@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +node-cron@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/node-cron/-/node-cron-3.0.2.tgz#bb0681342bd2dfb568f28e464031280e7f06bd01" + integrity sha512-iP8l0yGlNpE0e6q1o185yOApANRe47UPbLf4YxfbiNHt/RU5eBcGB/e0oudruheSf+LQeDMezqC5BVAb5wwRcQ== + dependencies: + uuid "8.3.2" + +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + +object-assign@^4: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.9.0: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +parse5-htmlparser2-tree-adapter@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" + integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== + dependencies: + domhandler "^5.0.2" + parse5 "^7.0.0" + +parse5@^7.0.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + 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" + +safe-buffer@5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + 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" + +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +swagger-parser@^10.0.3: + version "10.0.3" + resolved "https://registry.yarnpkg.com/swagger-parser/-/swagger-parser-10.0.3.tgz#04cb01c18c3ac192b41161c77f81e79309135d03" + integrity sha512-nF7oMeL4KypldrQhac8RyHerJeGPD1p2xDh900GPvc+Nk7nWP6jX2FcC7WmkinMoAmoO774+AFXcWsW8gMWEIg== + dependencies: + "@apidevtools/swagger-parser" "10.0.3" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +uuid@8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +validator@^13.7.0: + version "13.9.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855" + integrity sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +z-schema@^5.0.1: + version "5.0.5" + resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-5.0.5.tgz#6805a48c5366a6125cae0e58752babfd503daf32" + integrity sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q== + dependencies: + lodash.get "^4.4.2" + lodash.isequal "^4.5.0" + validator "^13.7.0" + optionalDependencies: + commander "^9.4.1" + +zlib@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/zlib/-/zlib-1.0.5.tgz#6e7c972fc371c645a6afb03ab14769def114fcc0" + integrity sha512-40fpE2II+Cd3k8HWTWONfeKE2jL+P42iWJ1zzps5W51qcTsOUKM5Q5m2PFb0CLxlmFAaUuUdJGc3OfZy947v0w== From 185b6d8d2db12ce9282ad20c5165afe7ded71506 Mon Sep 17 00:00:00 2001 From: priyanshu-kun Date: Sat, 1 Apr 2023 19:39:20 +0530 Subject: [PATCH 02/11] fix port number --- Dummy App/server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dummy App/server/index.js b/Dummy App/server/index.js index 3ed68b8..52a63ca 100644 --- a/Dummy App/server/index.js +++ b/Dummy App/server/index.js @@ -44,7 +44,7 @@ app.get('/search', async (req, res) => { } }) -const port = 8081 +const port = 8081 || process.env.PORT app.listen(port, () => { console.log(`App listening on port ${port}`) }) \ No newline at end of file From b7421c5ac983a3d2aadb15361843191335c9003d Mon Sep 17 00:00:00 2001 From: priyanshu-kun Date: Sat, 1 Apr 2023 19:49:38 +0530 Subject: [PATCH 03/11] fix github cache --- Dummy App/client/.env | 1 - Dummy App/client/.gitignore | 3 ++- Dummy App/client/main.js | 2 +- Dummy App/server/index.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 Dummy App/client/.env diff --git a/Dummy App/client/.env b/Dummy App/client/.env deleted file mode 100644 index c1ae9ae..0000000 --- a/Dummy App/client/.env +++ /dev/null @@ -1 +0,0 @@ -VITE_SERVER_URL=http://localhost:8081 \ No newline at end of file diff --git a/Dummy App/client/.gitignore b/Dummy App/client/.gitignore index a547bf3..57e09c4 100644 --- a/Dummy App/client/.gitignore +++ b/Dummy App/client/.gitignore @@ -7,6 +7,7 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* +.env node_modules dist dist-ssr @@ -21,4 +22,4 @@ dist-ssr *.ntvs* *.njsproj *.sln -*.sw? +*.sw? \ No newline at end of file diff --git a/Dummy App/client/main.js b/Dummy App/client/main.js index 79ad084..ca25eba 100644 --- a/Dummy App/client/main.js +++ b/Dummy App/client/main.js @@ -29,7 +29,7 @@ function makeOutput(data) { async function makeSearch() { try { - const response = await axios.get(`${import.meta.env.VITE_SERVER_URL}/search`,{ + const response = await axios.get(`${import.meta.env.VITE_SERVER_URL_CLOUD}/search`,{ params: { q: query } diff --git a/Dummy App/server/index.js b/Dummy App/server/index.js index 52a63ca..ae1a4a0 100644 --- a/Dummy App/server/index.js +++ b/Dummy App/server/index.js @@ -44,7 +44,7 @@ app.get('/search', async (req, res) => { } }) -const port = 8081 || process.env.PORT +const port = process.env.PORT || 8081 app.listen(port, () => { console.log(`App listening on port ${port}`) }) \ No newline at end of file From a8adceddf12f85e9703fa2de0b46bb43e2542fd5 Mon Sep 17 00:00:00 2001 From: priyanshu-kun Date: Sat, 10 Jun 2023 12:29:23 +0530 Subject: [PATCH 04/11] Created a default Sails.js server with no frontend in the src/server folder. --- Dummy App/client/index.html | 3 +- Dummy App/client/main.js | 12 +- Dummy App/server/package.json | 8 + Dummy App/server/yarn.lock | 281 ++- src/server/.editorconfig | 31 + src/server/.eslintignore | 1 + src/server/.eslintrc | 85 + src/server/.gitignore | 134 ++ src/server/.npmrc | 11 + src/server/.sailsrc | 12 + src/server/README.md | 26 + src/server/api/controllers/.gitkeep | 0 src/server/api/helpers/.gitkeep | 0 src/server/api/models/.gitkeep | 0 src/server/api/policies/.gitkeep | 0 src/server/app.js | 54 + src/server/config/blueprints.js | 41 + src/server/config/bootstrap.js | 30 + src/server/config/custom.js | 22 + src/server/config/datastores.js | 57 + src/server/config/env/production.js | 412 ++++ src/server/config/globals.js | 52 + src/server/config/http.js | 60 + src/server/config/i18n.js | 45 + src/server/config/locales/de.json | 4 + src/server/config/locales/en.json | 4 + src/server/config/locales/es.json | 4 + src/server/config/locales/fr.json | 4 + src/server/config/log.js | 29 + src/server/config/models.js | 124 ++ src/server/config/policies.js | 22 + src/server/config/routes.js | 14 + src/server/config/security.js | 54 + src/server/config/session.js | 39 + src/server/config/sockets.js | 82 + src/server/config/views.js | 41 + src/server/package-lock.json | 3192 +++++++++++++++++++++++++++ src/server/package.json | 32 + 38 files changed, 5018 insertions(+), 4 deletions(-) create mode 100644 src/server/.editorconfig create mode 100644 src/server/.eslintignore create mode 100644 src/server/.eslintrc create mode 100644 src/server/.gitignore create mode 100644 src/server/.npmrc create mode 100644 src/server/.sailsrc create mode 100644 src/server/README.md create mode 100644 src/server/api/controllers/.gitkeep create mode 100644 src/server/api/helpers/.gitkeep create mode 100644 src/server/api/models/.gitkeep create mode 100644 src/server/api/policies/.gitkeep create mode 100644 src/server/app.js create mode 100644 src/server/config/blueprints.js create mode 100644 src/server/config/bootstrap.js create mode 100644 src/server/config/custom.js create mode 100644 src/server/config/datastores.js create mode 100644 src/server/config/env/production.js create mode 100644 src/server/config/globals.js create mode 100644 src/server/config/http.js create mode 100644 src/server/config/i18n.js create mode 100644 src/server/config/locales/de.json create mode 100644 src/server/config/locales/en.json create mode 100644 src/server/config/locales/es.json create mode 100644 src/server/config/locales/fr.json create mode 100644 src/server/config/log.js create mode 100644 src/server/config/models.js create mode 100644 src/server/config/policies.js create mode 100644 src/server/config/routes.js create mode 100644 src/server/config/security.js create mode 100644 src/server/config/session.js create mode 100644 src/server/config/sockets.js create mode 100644 src/server/config/views.js create mode 100644 src/server/package-lock.json create mode 100644 src/server/package.json diff --git a/Dummy App/client/index.html b/Dummy App/client/index.html index 9a8e31e..055cc2e 100644 --- a/Dummy App/client/index.html +++ b/Dummy App/client/index.html @@ -24,7 +24,8 @@

    Dummy OpenAPI Web Search

      - Search results will be displayed here... +

      Loading...

      +

      Search results will be displayed here...

    Note -

    diff --git a/Dummy App/client/main.js b/Dummy App/client/main.js index ca25eba..e01dc3d 100644 --- a/Dummy App/client/main.js +++ b/Dummy App/client/main.js @@ -3,9 +3,13 @@ import axios from "axios" const input = document.getElementById("search_field"); const button = document.querySelector(".search_button") const searchResults = document.querySelector(".results"); +const loader = document.querySelector(".loader"); +const initialMsg = document.querySelector(".initial_msg") let query = "" input.value = query; +loader.style.display = "none"; + function renderResults(data) { @@ -29,12 +33,18 @@ function makeOutput(data) { async function makeSearch() { try { + loader.style.display = "block"; + initialMsg.style.display = "none"; const response = await axios.get(`${import.meta.env.VITE_SERVER_URL_CLOUD}/search`,{ params: { q: query } }) makeOutput(response.data) + loader.style.display = "none"; + initialMsg.style.display = "block"; + input.value = "" + query = "" } catch(e) { console.error("Something got wrong.",e) @@ -53,6 +63,4 @@ button.addEventListener("click",(e) => { return; } makeSearch(); - input.value = "" - query = "" }) diff --git a/Dummy App/server/package.json b/Dummy App/server/package.json index 620efc5..ad26def 100644 --- a/Dummy App/server/package.json +++ b/Dummy App/server/package.json @@ -3,7 +3,12 @@ "version": "1.0.0", "main": "index.js", "license": "MIT", + "scripts": { + "dev": "nodemon index.js", + "prod": "node index.js" + }, "dependencies": { + "@elastic/elasticsearch": "^8.6.0", "axios": "^1.3.4", "cheerio": "^1.0.0-rc.12", "cors": "^2.8.5", @@ -12,5 +17,8 @@ "node-cron": "^3.0.2", "swagger-parser": "^10.0.3", "zlib": "^1.0.5" + }, + "devDependencies": { + "nodemon": "^2.0.22" } } diff --git a/Dummy App/server/yarn.lock b/Dummy App/server/yarn.lock index 6171182..207e133 100644 --- a/Dummy App/server/yarn.lock +++ b/Dummy App/server/yarn.lock @@ -34,6 +34,26 @@ call-me-maybe "^1.0.1" z-schema "^5.0.1" +"@elastic/elasticsearch@^8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@elastic/elasticsearch/-/elasticsearch-8.6.0.tgz#c474f49808deee64b5bc5b8f938bf78f4468cb94" + integrity sha512-mN5EbbgSp1rfRmQ/5Hv7jqAK8xhGJxCg7G84xje8hSefE59P+HPPCv/+DgesCUSJdZpwXIo0DwOWHfHvktxxLw== + dependencies: + "@elastic/transport" "^8.3.1" + tslib "^2.4.0" + +"@elastic/transport@^8.3.1": + version "8.3.1" + resolved "https://registry.yarnpkg.com/@elastic/transport/-/transport-8.3.1.tgz#e7569d7df35b03108ea7aa886113800245faa17f" + integrity sha512-jv/Yp2VLvv5tSMEOF8iGrtL2YsYHbpf4s+nDsItxUTLFTzuJGpnsB/xBlfsoT2kAYEnWHiSJuqrbRcpXEI/SEQ== + dependencies: + debug "^4.3.4" + hpagent "^1.0.0" + ms "^2.1.3" + secure-json-parse "^2.4.0" + tslib "^2.4.0" + undici "^5.5.1" + "@jsdevtools/ono@^7.1.3": version "7.1.3" resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" @@ -44,6 +64,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" @@ -52,6 +77,14 @@ accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" @@ -76,6 +109,16 @@ axios@^1.3.4: form-data "^4.0.0" proxy-from-env "^1.1.0" +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + body-parser@1.20.1: version "1.20.1" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" @@ -99,6 +142,28 @@ boolbase@^1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +busboy@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== + dependencies: + streamsearch "^1.1.0" + bytes@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" @@ -142,6 +207,21 @@ cheerio@^1.0.0-rc.12: parse5 "^7.0.0" parse5-htmlparser2-tree-adapter "^7.0.0" +chokidar@^3.5.2: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -154,6 +234,11 @@ commander@^9.4.1: resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + content-disposition@0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" @@ -207,6 +292,20 @@ debug@2.6.9: dependencies: ms "2.0.0" +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -319,6 +418,13 @@ express@^4.18.2: utils-merge "1.0.1" vary "~1.1.2" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + finalhandler@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" @@ -356,6 +462,11 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -370,6 +481,18 @@ get-intrinsic@^1.0.2: has "^1.0.3" has-symbols "^1.0.3" +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -382,6 +505,11 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +hpagent@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hpagent/-/hpagent-1.2.0.tgz#0ae417895430eb3770c03443456b8d90ca464903" + integrity sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA== + htmlparser2@^8.0.1: version "8.0.2" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" @@ -410,6 +538,11 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +ignore-by-default@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" + integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== + inherits@2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" @@ -420,6 +553,30 @@ ipaddr.js@1.9.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -469,12 +626,24 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== +minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== -ms@2.1.3: +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -491,6 +660,34 @@ node-cron@^3.0.2: dependencies: uuid "8.3.2" +nodemon@^2.0.22: + version "2.0.22" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.22.tgz#182c45c3a78da486f673d6c1702e00728daf5258" + integrity sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ== + dependencies: + chokidar "^3.5.2" + debug "^3.2.7" + ignore-by-default "^1.0.1" + minimatch "^3.1.2" + pstree.remy "^1.1.8" + semver "^5.7.1" + simple-update-notifier "^1.0.7" + supports-color "^5.5.0" + touch "^3.1.0" + undefsafe "^2.0.5" + +nopt@~1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" + integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg== + dependencies: + abbrev "1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + nth-check@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" @@ -540,6 +737,11 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + proxy-addr@~2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" @@ -553,6 +755,11 @@ proxy-from-env@^1.1.0: resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== +pstree.remy@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" + integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== + qs@6.11.0: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" @@ -575,6 +782,13 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + safe-buffer@5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -585,6 +799,21 @@ safe-buffer@5.2.1: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +secure-json-parse@^2.4.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862" + integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== + +semver@^5.7.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@~7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -628,11 +857,30 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +simple-update-notifier@^1.0.7: + version "1.1.0" + resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz#67694c121de354af592b347cdba798463ed49c82" + integrity sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg== + dependencies: + semver "~7.0.0" + statuses@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== + +supports-color@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + swagger-parser@^10.0.3: version "10.0.3" resolved "https://registry.yarnpkg.com/swagger-parser/-/swagger-parser-10.0.3.tgz#04cb01c18c3ac192b41161c77f81e79309135d03" @@ -640,11 +888,30 @@ swagger-parser@^10.0.3: dependencies: "@apidevtools/swagger-parser" "10.0.3" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + toidentifier@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== +touch@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" + integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== + dependencies: + nopt "~1.0.10" + +tslib@^2.4.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -653,6 +920,18 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +undefsafe@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" + integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== + +undici@^5.5.1: + version "5.21.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.21.0.tgz#b00dfc381f202565ab7f52023222ab862bb2494f" + integrity sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA== + dependencies: + busboy "^1.6.0" + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" diff --git a/src/server/.editorconfig b/src/server/.editorconfig new file mode 100644 index 0000000..6d7fa70 --- /dev/null +++ b/src/server/.editorconfig @@ -0,0 +1,31 @@ +################################################ +# ╔═╗╔╦╗╦╔╦╗╔═╗╦═╗┌─┐┌─┐┌┐┌┌─┐┬┌─┐ +# ║╣ ║║║ ║ ║ ║╠╦╝│ │ ││││├┤ ││ ┬ +# o╚═╝═╩╝╩ ╩ ╚═╝╩╚═└─┘└─┘┘└┘└ ┴└─┘ +# +# > Formatting conventions for your Sails app. +# +# This file (`.editorconfig`) exists to help +# maintain consistent formatting throughout the +# files in your Sails app. +# +# For the sake of convention, the Sails team's +# preferred settings are included here out of the +# box. You can also change this file to fit your +# team's preferences (for example, if all of the +# developers on your team have a strong preference +# for tabs over spaces), +# +# To review what each of these options mean, see: +# http://editorconfig.org/ +# +################################################ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/src/server/.eslintignore b/src/server/.eslintignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/server/.eslintignore @@ -0,0 +1 @@ + diff --git a/src/server/.eslintrc b/src/server/.eslintrc new file mode 100644 index 0000000..8f4e1f5 --- /dev/null +++ b/src/server/.eslintrc @@ -0,0 +1,85 @@ +{ + // ╔═╗╔═╗╦ ╦╔╗╔╔╦╗┬─┐┌─┐ + // ║╣ ╚═╗║ ║║║║ ║ ├┬┘│ + // o╚═╝╚═╝╩═╝╩╝╚╝ ╩ ┴└─└─┘ + // A set of basic code conventions designed to encourage quality and consistency + // across your Sails app's code base. These rules are checked against + // automatically any time you run `npm test`. + // + // > Note: If you're using mocha, you'll want to add an extra override file to your + // > `test/` folder so that eslint will tolerate mocha-specific globals like `before` + // > and `describe`. + // Designed for ESLint v4. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // For more information about any of the rules below, check out the relevant + // reference page on eslint.org. For example, to get details on "no-sequences", + // you would visit `http://eslint.org/docs/rules/no-sequences`. If you're unsure + // or could use some advice, come by https://sailsjs.com/support. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + "env": { + "node": true + }, + + "parserOptions": { + "ecmaVersion": 2018 + }, + + "globals": { + // If "no-undef" is enabled below, be sure to list all global variables that + // are used in this app's backend code (including the globalIds of models): + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + "Promise": true, + "sails": true, + "_": true + // …and any others (e.g. `"Organization": true`) + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + }, + + "rules": { + "block-scoped-var": ["error"], + "callback-return": ["error", ["done", "proceed", "next", "onwards", "callback", "cb"]], + "camelcase": ["warn", {"properties":"always"}], + "comma-style": ["warn", "last"], + "curly": ["warn"], + "eqeqeq": ["error", "always"], + "eol-last": ["warn"], + "handle-callback-err": ["error"], + "indent": ["warn", 2, { + "SwitchCase": 1, + "MemberExpression": "off", + "FunctionDeclaration": {"body":1, "parameters":"off"}, + "FunctionExpression": {"body":1, "parameters":"off"}, + "CallExpression": {"arguments":"off"}, + "ArrayExpression": 1, + "ObjectExpression": 1, + "ignoredNodes": ["ConditionalExpression"] + }], + "linebreak-style": ["error", "unix"], + "no-dupe-keys": ["error"], + "no-duplicate-case": ["error"], + "no-extra-semi": ["warn"], + "no-labels": ["error"], + "no-mixed-spaces-and-tabs": [2, "smart-tabs"], + "no-redeclare": ["warn"], + "no-return-assign": ["error", "always"], + "no-sequences": ["error"], + "no-trailing-spaces": ["warn"], + "no-undef": ["off"], + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // ^^Note: If this "no-undef" rule is enabled (set to `["error"]`), then all model globals + // (e.g. `"Organization": true`) should be included above under "globals". + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + "no-unexpected-multiline": ["warn"], + "no-unreachable": ["warn"], + "no-unused-vars": ["warn", {"caughtErrors":"all", "caughtErrorsIgnorePattern": "^unused($|[A-Z].*$)", "argsIgnorePattern": "^unused($|[A-Z].*$)", "varsIgnorePattern": "^unused($|[A-Z].*$)" }], + "no-use-before-define": ["error", {"functions":false}], + "one-var": ["warn", "never"], + "prefer-arrow-callback": ["warn", {"allowNamedFunctions":true}], + "quotes": ["warn", "single", {"avoidEscape":false, "allowTemplateLiterals":true}], + "semi": ["warn", "always"], + "semi-spacing": ["warn", {"before":false, "after":true}], + "semi-style": ["warn", "last"] + } + +} diff --git a/src/server/.gitignore b/src/server/.gitignore new file mode 100644 index 0000000..a1ddb80 --- /dev/null +++ b/src/server/.gitignore @@ -0,0 +1,134 @@ +################################################ +# ┌─┐┬┌┬┐╦╔═╗╔╗╔╔═╗╦═╗╔═╗ +# │ ┬│ │ ║║ ╦║║║║ ║╠╦╝║╣ +# o└─┘┴ ┴ ╩╚═╝╝╚╝╚═╝╩╚═╚═╝ +# +# > Files to exclude from your app's repo. +# +# This file (`.gitignore`) is only relevant if +# you are using git. +# +# It exists to signify to git that certain files +# and/or directories should be ignored for the +# purposes of version control. +# +# This keeps tmp files and sensitive credentials +# from being uploaded to your repository. And +# it allows you to configure your app for your +# machine without accidentally committing settings +# which will smash the local settings of other +# developers on your team. +# +# Some reasonable defaults are included below, +# but, of course, you should modify/extend/prune +# to fit your needs! +# +################################################ + + +################################################ +# Local Configuration +# +# Explicitly ignore files which contain: +# +# 1. Sensitive information you'd rather not push to +# your git repository. +# e.g., your personal API keys or passwords. +# +# 2. Developer-specific configuration +# Basically, anything that would be annoying +# to have to change every time you do a +# `git pull` on your laptop. +# e.g. your local development database, or +# the S3 bucket you're using for file uploads +# during development. +# +################################################ + +config/local.js + + +################################################ +# Dependencies +# +# +# When releasing a production app, you _could_ +# hypothetically include your node_modules folder +# in your git repo, but during development, it +# is always best to exclude it, since different +# developers may be working on different kernels, +# where dependencies would need to be recompiled +# anyway. +# +# Most of the time, the node_modules folder can +# be excluded from your code repository, even +# in production, thanks to features like the +# package-lock.json file / NPM shrinkwrap. +# +# But no matter what, since this is a Sails app, +# you should always push up the package-lock.json +# or shrinkwrap file to your repository, to avoid +# accidentally pulling in upgraded dependencies +# and breaking your code. +# +# That said, if you are having trouble with +# dependencies, (particularly when using +# `npm link`) this can be pretty discouraging. +# But rather than just adding the lockfile to +# your .gitignore, try this first: +# ``` +# rm -rf node_modules +# rm package-lock.json +# npm install +# ``` +# +# [?] For more tips/advice, come by and say hi +# over at https://sailsjs.com/support +# +################################################ + +node_modules + + +################################################ +# +# > Do you use bower? +# > re: the bower_components dir, see this: +# > http://addyosmani.com/blog/checking-in-front-end-dependencies/ +# > (credit Addy Osmani, @addyosmani) +# +################################################ + + +################################################ +# Temporary files generated by Sails/Waterline. +################################################ + +.tmp + + +################################################ +# Miscellaneous +# +# Common files generated by text editors, +# operating systems, file systems, dbs, etc. +################################################ + +*~ +*# +.DS_STORE +.netbeans +nbproject +.idea +*.iml +.vscode +.node_history +dump.rdb + +npm-debug.log +lib-cov +*.seed +*.log +*.out +*.pid + diff --git a/src/server/.npmrc b/src/server/.npmrc new file mode 100644 index 0000000..43601ce --- /dev/null +++ b/src/server/.npmrc @@ -0,0 +1,11 @@ +###################### +# ╔╗╔╔═╗╔╦╗┬─┐┌─┐ # +# ║║║╠═╝║║║├┬┘│ # +# o╝╚╝╩ ╩ ╩┴└─└─┘ # +###################### + +# Hide NPM log output unless it is related to an error of some kind: +loglevel=error + +# Make "npm audit" an opt-in thing for subsequent installs within this app: +audit=false diff --git a/src/server/.sailsrc b/src/server/.sailsrc new file mode 100644 index 0000000..5407fdb --- /dev/null +++ b/src/server/.sailsrc @@ -0,0 +1,12 @@ +{ + "generators": { + "modules": {} + }, + "_generatedWith": { + "sails": "1.5.4", + "sails-generate": "2.0.8" + }, + "hooks": { + "grunt": false + } +} diff --git a/src/server/README.md b/src/server/README.md new file mode 100644 index 0000000..89e43ef --- /dev/null +++ b/src/server/README.md @@ -0,0 +1,26 @@ +# server + +a [Sails v1](https://sailsjs.com) application + + +### Links + ++ [Sails framework documentation](https://sailsjs.com/get-started) ++ [Version notes / upgrading](https://sailsjs.com/documentation/upgrading) ++ [Deployment tips](https://sailsjs.com/documentation/concepts/deployment) ++ [Community support options](https://sailsjs.com/support) ++ [Professional / enterprise options](https://sailsjs.com/enterprise) + + +### Version info + +This app was originally generated on Sat Jun 10 2023 12:22:10 GMT+0530 (India Standard Time) using Sails v1.5.4. + + + + + + + diff --git a/src/server/api/controllers/.gitkeep b/src/server/api/controllers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/server/api/helpers/.gitkeep b/src/server/api/helpers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/server/api/models/.gitkeep b/src/server/api/models/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/server/api/policies/.gitkeep b/src/server/api/policies/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/server/app.js b/src/server/app.js new file mode 100644 index 0000000..f2c5f4e --- /dev/null +++ b/src/server/app.js @@ -0,0 +1,54 @@ +/** + * app.js + * + * Use `app.js` to run your app without `sails lift`. + * To start the server, run: `node app.js`. + * + * This is handy in situations where the sails CLI is not relevant or useful, + * such as when you deploy to a server, or a PaaS like Heroku. + * + * For example: + * => `node app.js` + * => `npm start` + * => `forever start app.js` + * => `node debug app.js` + * + * The same command-line arguments and env vars are supported, e.g.: + * `NODE_ENV=production node app.js --port=80 --verbose` + * + * For more information see: + * https://sailsjs.com/anatomy/app.js + */ + + +// Ensure we're in the project directory, so cwd-relative paths work as expected +// no matter where we actually lift from. +// > Note: This is not required in order to lift, but it is a convenient default. +process.chdir(__dirname); + + + +// Attempt to import `sails` dependency, as well as `rc` (for loading `.sailsrc` files). +var sails; +var rc; +try { + sails = require('sails'); + rc = require('sails/accessible/rc'); +} catch (err) { + console.error('Encountered an error when attempting to require(\'sails\'):'); + console.error(err.stack); + console.error('--'); + console.error('To run an app using `node app.js`, you need to have Sails installed'); + console.error('locally (`./node_modules/sails`). To do that, just make sure you\'re'); + console.error('in the same directory as your app and run `npm install`.'); + console.error(); + console.error('If Sails is installed globally (i.e. `npm install -g sails`) you can'); + console.error('also run this app with `sails lift`. Running with `sails lift` will'); + console.error('not run this file (`app.js`), but it will do exactly the same thing.'); + console.error('(It even uses your app directory\'s local Sails install, if possible.)'); + return; +}//-• + + +// Start server +sails.lift(rc('sails')); diff --git a/src/server/config/blueprints.js b/src/server/config/blueprints.js new file mode 100644 index 0000000..e8552ef --- /dev/null +++ b/src/server/config/blueprints.js @@ -0,0 +1,41 @@ +/** + * Blueprint API Configuration + * (sails.config.blueprints) + * + * For background on the blueprint API in Sails, check out: + * https://sailsjs.com/docs/reference/blueprint-api + * + * For details and more available options, see: + * https://sailsjs.com/config/blueprints + */ + +module.exports.blueprints = { + + /*************************************************************************** + * * + * Automatically expose implicit routes for every action in your app? * + * * + ***************************************************************************/ + + // actions: false, + + + /*************************************************************************** + * * + * Automatically expose RESTful routes for your models? * + * * + ***************************************************************************/ + + // rest: true, + + + /*************************************************************************** + * * + * Automatically expose CRUD "shortcut" routes to GET requests? * + * (These are enabled by default in development only.) * + * * + ***************************************************************************/ + + // shortcuts: true, + +}; diff --git a/src/server/config/bootstrap.js b/src/server/config/bootstrap.js new file mode 100644 index 0000000..fb1c17f --- /dev/null +++ b/src/server/config/bootstrap.js @@ -0,0 +1,30 @@ +/** + * Seed Function + * (sails.config.bootstrap) + * + * A function that runs just before your Sails app gets lifted. + * > Need more flexibility? You can also create a hook. + * + * For more information on seeding your app with fake data, check out: + * https://sailsjs.com/config/bootstrap + */ + +module.exports.bootstrap = async function() { + + // By convention, this is a good place to set up fake data during development. + // + // For example: + // ``` + // // Set up fake development data (or if we already have some, avast) + // if (await User.count() > 0) { + // return; + // } + // + // await User.createEach([ + // { emailAddress: 'ry@example.com', fullName: 'Ryan Dahl', }, + // { emailAddress: 'rachael@example.com', fullName: 'Rachael Shaw', }, + // // etc. + // ]); + // ``` + +}; diff --git a/src/server/config/custom.js b/src/server/config/custom.js new file mode 100644 index 0000000..9ecf33a --- /dev/null +++ b/src/server/config/custom.js @@ -0,0 +1,22 @@ +/** + * Custom configuration + * (sails.config.custom) + * + * One-off settings specific to your application. + * + * For more information on custom configuration, visit: + * https://sailsjs.com/config/custom + */ + +module.exports.custom = { + + /*************************************************************************** + * * + * Any other custom config this Sails app should use during development. * + * * + ***************************************************************************/ + // sendgridSecret: 'SG.fake.3e0Bn0qSQVnwb1E4qNPz9JZP5vLZYqjh7sn8S93oSHU', + // stripeSecret: 'sk_test_Zzd814nldl91104qor5911gjald', + // … + +}; diff --git a/src/server/config/datastores.js b/src/server/config/datastores.js new file mode 100644 index 0000000..3853184 --- /dev/null +++ b/src/server/config/datastores.js @@ -0,0 +1,57 @@ +/** + * Datastores + * (sails.config.datastores) + * + * A set of datastore configurations which tell Sails where to fetch or save + * data when you execute built-in model methods like `.find()` and `.create()`. + * + * > This file is mainly useful for configuring your development database, + * > as well as any additional one-off databases used by individual models. + * > Ready to go live? Head towards `config/env/production.js`. + * + * For more information on configuring datastores, check out: + * https://sailsjs.com/config/datastores + */ + +module.exports.datastores = { + + + /*************************************************************************** + * * + * Your app's default datastore. * + * * + * Sails apps read and write to local disk by default, using a built-in * + * database adapter called `sails-disk`. This feature is purely for * + * convenience during development; since `sails-disk` is not designed for * + * use in a production environment. * + * * + * To use a different db _in development_, follow the directions below. * + * Otherwise, just leave the default datastore as-is, with no `adapter`. * + * * + * (For production configuration, see `config/env/production.js`.) * + * * + ***************************************************************************/ + + default: { + + /*************************************************************************** + * * + * Want to use a different database during development? * + * * + * 1. Choose an adapter: * + * https://sailsjs.com/plugins/databases * + * * + * 2. Install it as a dependency of your Sails app. * + * (For example: npm install sails-mysql --save) * + * * + * 3. Then pass it in, along with a connection URL. * + * (See https://sailsjs.com/config/datastores for help.) * + * * + ***************************************************************************/ + // adapter: 'sails-mysql', + // url: 'mysql://user:password@host:port/database', + + }, + + +}; diff --git a/src/server/config/env/production.js b/src/server/config/env/production.js new file mode 100644 index 0000000..2e9fde6 --- /dev/null +++ b/src/server/config/env/production.js @@ -0,0 +1,412 @@ +/** + * Production environment settings + * (sails.config.*) + * + * What you see below is a quick outline of the built-in settings you need + * to configure your Sails app for production. The configuration in this file + * is only used in your production environment, i.e. when you lift your app using: + * + * ``` + * NODE_ENV=production node app + * ``` + * + * > If you're using git as a version control solution for your Sails app, + * > this file WILL BE COMMITTED to your repository by default, unless you add + * > it to your .gitignore file. If your repository will be publicly viewable, + * > don't add private/sensitive data (like API secrets / db passwords) to this file! + * + * For more best practices and tips, see: + * https://sailsjs.com/docs/concepts/deployment + */ + +module.exports = { + + + /************************************************************************** + * * + * Tell Sails what database(s) it should use in production. * + * * + * (https://sailsjs.com/config/datastores) * + * * + **************************************************************************/ + datastores: { + + /*************************************************************************** + * * + * Configure your default production database. * + * * + * 1. Choose an adapter: * + * https://sailsjs.com/plugins/databases * + * * + * 2. Install it as a dependency of your Sails app. * + * (For example: npm install sails-mysql --save) * + * * + * 3. Then set it here (`adapter`), along with a connection URL (`url`) * + * and any other, adapter-specific customizations. * + * (See https://sailsjs.com/config/datastores for help.) * + * * + ***************************************************************************/ + default: { + // adapter: 'sails-mysql', + // url: 'mysql://user:password@host:port/database', + //-------------------------------------------------------------------------- + // /\ To avoid checking it in to version control, you might opt to set + // || sensitive credentials like `url` using an environment variable. + // + // For example: + // ``` + // sails_datastores__default__url=mysql://admin:myc00lpAssw2D@db.example.com:3306/my_prod_db + // ``` + //-------------------------------------------------------------------------- + + /**************************************************************************** + * * + * More adapter-specific options * + * * + * > For example, for some hosted PostgreSQL providers (like Heroku), the * + * > extra `ssl` object with a `rejectUnauthorized` option must be provided. * + * * + * More info: * + * https://sailsjs.com/config/datastores * + * * + ****************************************************************************/ + // ssl: { rejectUnauthorized: true }, + + }, + + }, + + + + models: { + + /*************************************************************************** + * * + * To help avoid accidents, Sails automatically sets the automigration * + * strategy to "safe" when your app lifts in production mode. * + * (This is just here as a reminder.) * + * * + * More info: * + * https://sailsjs.com/docs/concepts/models-and-orm/model-settings#?migrate * + * * + ***************************************************************************/ + migrate: 'safe', + + /*************************************************************************** + * * + * If, in production, this app has access to physical-layer CASCADE * + * constraints (e.g. PostgreSQL or MySQL), then set those up in the * + * database and uncomment this to disable Waterline's `cascadeOnDestroy` * + * polyfill. (Otherwise, if you are using a databse like Mongo, you might * + * choose to keep this enabled.) * + * * + ***************************************************************************/ + // cascadeOnDestroy: false, + + }, + + + + /************************************************************************** + * * + * Always disable "shortcut" blueprint routes. * + * * + * > You'll also want to disable any other blueprint routes if you are not * + * > actually using them (e.g. "actions" and "rest") -- but you can do * + * > that in `config/blueprints.js`, since you'll want to disable them in * + * > all environments (not just in production.) * + * * + ***************************************************************************/ + blueprints: { + shortcuts: false, + }, + + + + /*************************************************************************** + * * + * Configure your security settings for production. * + * * + * IMPORTANT: * + * If web browsers will be communicating with your app, be sure that * + * you have CSRF protection enabled. To do that, set `csrf: true` over * + * in the `config/security.js` file (not here), so that CSRF app can be * + * tested with CSRF protection turned on in development mode too. * + * * + ***************************************************************************/ + security: { + + /*************************************************************************** + * * + * If this app has CORS enabled (see `config/security.js`) with the * + * `allowCredentials` setting enabled, then you should uncomment the * + * `allowOrigins` whitelist below. This sets which "origins" are allowed * + * to send cross-domain (CORS) requests to your Sails app. * + * * + * > Replace "https://example.com" with the URL of your production server. * + * > Be sure to use the right protocol! ("http://" vs. "https://") * + * * + ***************************************************************************/ + cors: { + // allowOrigins: [ + // 'https://example.com', + // ] + }, + + }, + + + + /*************************************************************************** + * * + * Configure how your app handles sessions in production. * + * * + * (https://sailsjs.com/config/session) * + * * + * > If you have disabled the "session" hook, then you can safely remove * + * > this section from your `config/env/production.js` file. * + * * + ***************************************************************************/ + session: { + + /*************************************************************************** + * * + * Production session store configuration. * + * * + * Uncomment the following lines to finish setting up a package called * + * "@sailshq/connect-redis" that will use Redis to handle session data. * + * This makes your app more scalable by allowing you to share sessions * + * across a cluster of multiple Sails/Node.js servers and/or processes. * + * (See http://bit.ly/redis-session-config for more info.) * + * * + * > While @sailshq/connect-redis is a popular choice for Sails apps, many * + * > other compatible packages (like "connect-mongo") are available on NPM. * + * > (For a full list, see https://sailsjs.com/plugins/sessions) * + * * + ***************************************************************************/ + // adapter: '@sailshq/connect-redis', + // url: 'redis://user:password@localhost:6379/databasenumber', + //-------------------------------------------------------------------------- + // /\ OR, to avoid checking it in to version control, you might opt to + // || set sensitive credentials like this using an environment variable. + // + // For example: + // ``` + // sails_session__url=redis://admin:myc00lpAssw2D@bigsquid.redistogo.com:9562/0 + // ``` + // + //-------------------------------------------------------------------------- + + /*************************************************************************** + * * + * Production configuration for the session ID cookie name. * + * * + * We reccomend prefixing your session cookie with `__Host-`, this limits * + * the scope of your cookie to a single origin to protect against same-site * + * attacks. * + * * + * Note that with the `__Host-` prefix, session cookies will _not_ be sent * + * unless `sails.config.cookie.secure` is set to `true`. * + * * + * Read more: * + * https://sailsjs.com/config/session#?the-session-id-cookie * + * * + ***************************************************************************/ + // name: '__Host-sails.sid', + + /*************************************************************************** + * * + * Production configuration for the session ID cookie. * + * * + * Tell browsers (or other user agents) to ensure that session ID cookies * + * are always transmitted via HTTPS, and that they expire 24 hours after * + * they are set. * + * * + * Note that with `secure: true` set, session cookies will _not_ be * + * transmitted over unsecured (HTTP) connections. Also, for apps behind * + * proxies (like Heroku), the `trustProxy` setting under `http` must be * + * configured in order for `secure: true` to work. * + * * + * > While you might want to increase or decrease the `maxAge` or provide * + * > other options, you should always set `secure: true` in production * + * > if the app is being served over HTTPS. * + * * + * Read more: * + * https://sailsjs.com/config/session#?the-session-id-cookie * + * * + ***************************************************************************/ + cookie: { + // secure: true, + maxAge: 24 * 60 * 60 * 1000, // 24 hours + }, + + }, + + + + /************************************************************************** + * * + * Set up Socket.io for your production environment. * + * * + * (https://sailsjs.com/config/sockets) * + * * + * > If you have disabled the "sockets" hook, then you can safely remove * + * > this section from your `config/env/production.js` file. * + * * + ***************************************************************************/ + sockets: { + + /*************************************************************************** + * * + * Uncomment the `onlyAllowOrigins` whitelist below to configure which * + * "origins" are allowed to open socket connections to your Sails app. * + * * + * > Replace "https://example.com" etc. with the URL(s) of your app. * + * > Be sure to use the right protocol! ("http://" vs. "https://") * + * * + ***************************************************************************/ + // onlyAllowOrigins: [ + // 'https://example.com', + // 'https://staging.example.com', + // ], + + + /*************************************************************************** + * * + * If you are deploying a cluster of multiple servers and/or processes, * + * then uncomment the following lines. This tells Socket.io about a Redis * + * server it can use to help it deliver broadcasted socket messages. * + * * + * > Be sure a compatible version of @sailshq/socket.io-redis is installed! * + * > (See https://sailsjs.com/config/sockets for the latest version info) * + * * + * (https://sailsjs.com/docs/concepts/deployment/scaling) * + * * + ***************************************************************************/ + // adapter: '@sailshq/socket.io-redis', + // url: 'redis://user:password@bigsquid.redistogo.com:9562/databasenumber', + //-------------------------------------------------------------------------- + // /\ OR, to avoid checking it in to version control, you might opt to + // || set sensitive credentials like this using an environment variable. + // + // For example: + // ``` + // sails_sockets__url=redis://admin:myc00lpAssw2D@bigsquid.redistogo.com:9562/0 + // ``` + //-------------------------------------------------------------------------- + + }, + + + + /************************************************************************** + * * + * Set the production log level. * + * * + * (https://sailsjs.com/config/log) * + * * + ***************************************************************************/ + log: { + level: 'debug' + }, + + + + http: { + + /*************************************************************************** + * * + * The number of milliseconds to cache static assets in production. * + * (the "max-age" to include in the "Cache-Control" response header) * + * * + * If you are caching assets with a tool like Cloudflare, you may want to * + * reduce this considerably to allow more flexibility in purging the cache. * + * * + ***************************************************************************/ + cache: 365.25 * 24 * 60 * 60 * 1000, // One year + + /*************************************************************************** + * * + * Proxy settings * + * * + * If your app will be deployed behind a proxy/load balancer - for example, * + * on a PaaS like Heroku - then uncomment the `trustProxy` setting below. * + * This tells Sails/Express how to interpret X-Forwarded headers. * + * * + * This setting is especially important if you are using secure cookies * + * (see the `cookies: secure` setting under `session` above) or if your app * + * relies on knowing the original IP address that a request came from. * + * * + * (https://sailsjs.com/config/http) * + * * + ***************************************************************************/ + // trustProxy: true, + + }, + + + + /************************************************************************** + * * + * Lift the server on port 80. * + * (if deploying behind a proxy, or to a PaaS like Heroku or Deis, you * + * probably don't need to set a port here, because it is oftentimes * + * handled for you automatically. If you are not sure if you need to set * + * this, just try deploying without setting it and see if it works.) * + * * + ***************************************************************************/ + // port: 80, + + + + /************************************************************************** + * * + * Configure an SSL certificate * + * * + * For the safety of your users' data, you should use SSL in production. * + * ...But in many cases, you may not actually want to set it up _here_. * + * * + * Normally, this setting is only relevant when running a single-process * + * deployment, with no proxy/load balancer in the mix. But if, on the * + * other hand, you are using a PaaS like Heroku, you'll want to set up * + * SSL in your load balancer settings (usually somewhere in your hosting * + * provider's dashboard-- not here.) * + * * + * > For more information about configuring SSL in Sails, see: * + * > https://sailsjs.com/config/*#?sailsconfigssl * + * * + **************************************************************************/ + // ssl: undefined, + + + + /************************************************************************** + * * + * Production overrides for any custom settings specific to your app. * + * (for example, production credentials for 3rd party APIs like Stripe) * + * * + * > See config/custom.js for more info on how to configure these options. * + * * + ***************************************************************************/ + custom: { + baseUrl: 'https://example.com', + internalEmailAddress: 'support@example.com', + + // sendgridSecret: 'SG.fake.3e0Bn0qSQVnwb1E4qNPz9JZP5vLZYqjh7sn8S93oSHU', + // stripeSecret: 'sk_prod__fake_Nfgh82401348jaDa3lkZ0d9Hm', + //-------------------------------------------------------------------------- + // /\ OR, to avoid checking them in to version control, you might opt to + // || set sensitive credentials like these using environment variables. + // + // For example: + // ``` + // sendgridSecret=SG.fake.3e0Bn0qSQVnwb1E4qNPz9JZP5vLZYqjh7sn8S93oSHU + // sails_custom__stripeSecret=sk_prod__fake_Nfgh82401348jaDa3lkZ0d9Hm + // ``` + //-------------------------------------------------------------------------- + + }, + + + +}; diff --git a/src/server/config/globals.js b/src/server/config/globals.js new file mode 100644 index 0000000..f63701f --- /dev/null +++ b/src/server/config/globals.js @@ -0,0 +1,52 @@ +/** + * Global Variable Configuration + * (sails.config.globals) + * + * Configure which global variables which will be exposed + * automatically by Sails. + * + * For more information on any of these options, check out: + * https://sailsjs.com/config/globals + */ + +module.exports.globals = { + + /**************************************************************************** + * * + * Whether to expose the locally-installed Lodash as a global variable * + * (`_`), making it accessible throughout your app. * + * * + ****************************************************************************/ + + _: require('@sailshq/lodash'), + + /**************************************************************************** + * * + * This app was generated without a dependency on the "async" NPM package. * + * * + * > Don't worry! This is totally unrelated to JavaScript's "async/await". * + * > Your code can (and probably should) use `await` as much as possible. * + * * + ****************************************************************************/ + + async: false, + + /**************************************************************************** + * * + * Whether to expose each of your app's models as global variables. * + * (See the link at the top of this file for more information.) * + * * + ****************************************************************************/ + + models: true, + + /**************************************************************************** + * * + * Whether to expose the Sails app instance as a global variable (`sails`), * + * making it accessible throughout your app. * + * * + ****************************************************************************/ + + sails: true, + +}; diff --git a/src/server/config/http.js b/src/server/config/http.js new file mode 100644 index 0000000..3cf438f --- /dev/null +++ b/src/server/config/http.js @@ -0,0 +1,60 @@ +/** + * HTTP Server Settings + * (sails.config.http) + * + * Configuration for the underlying HTTP server in Sails. + * (for additional recommended settings, see `config/env/production.js`) + * + * For more information on configuration, check out: + * https://sailsjs.com/config/http + */ + +module.exports.http = { + + /**************************************************************************** + * * + * Sails/Express middleware to run for every HTTP request. * + * (Only applies to HTTP requests -- not virtual WebSocket requests.) * + * * + * https://sailsjs.com/documentation/concepts/middleware * + * * + ****************************************************************************/ + + middleware: { + + /*************************************************************************** + * * + * The order in which middleware should be run for HTTP requests. * + * (This Sails app's routes are handled by the "router" middleware below.) * + * * + ***************************************************************************/ + + // order: [ + // 'cookieParser', + // 'session', + // 'bodyParser', + // 'compress', + // 'poweredBy', + // 'router', + // 'www', + // 'favicon', + // ], + + + /*************************************************************************** + * * + * The body parser that will handle incoming multipart HTTP requests. * + * * + * https://sailsjs.com/config/http#?customizing-the-body-parser * + * * + ***************************************************************************/ + + // bodyParser: (function _configureBodyParser(){ + // var skipper = require('skipper'); + // var middlewareFn = skipper({ strict: true }); + // return middlewareFn; + // })(), + + }, + +}; diff --git a/src/server/config/i18n.js b/src/server/config/i18n.js new file mode 100644 index 0000000..0b652d2 --- /dev/null +++ b/src/server/config/i18n.js @@ -0,0 +1,45 @@ +/** + * Internationalization / Localization Settings + * (sails.config.i18n) + * + * If your app will touch people from all over the world, i18n (or internationalization) + * may be an important part of your international strategy. + * + * For a complete list of options for Sails' built-in i18n support, see: + * https://sailsjs.com/config/i-18-n + * + * For more info on i18n in Sails in general, check out: + * https://sailsjs.com/docs/concepts/internationalization + */ + +module.exports.i18n = { + + /*************************************************************************** + * * + * Which locales are supported? * + * * + ***************************************************************************/ + + locales: ['en', 'es', 'fr', 'de'], + + /**************************************************************************** + * * + * What is the default locale for the site? Note that this setting will be * + * overridden for any request that sends an "Accept-Language" header (i.e. * + * most browsers), but it's still useful if you need to localize the * + * response for requests made by non-browser clients (e.g. cURL). * + * * + ****************************************************************************/ + + // defaultLocale: 'en', + + /**************************************************************************** + * * + * Path (relative to app root) of directory to store locale (translation) * + * files in. * + * * + ****************************************************************************/ + + // localesDirectory: 'config/locales' + +}; diff --git a/src/server/config/locales/de.json b/src/server/config/locales/de.json new file mode 100644 index 0000000..12f23d9 --- /dev/null +++ b/src/server/config/locales/de.json @@ -0,0 +1,4 @@ +{ + "Welcome": "Willkommen", + "A brand new app.": "Eine neue App." +} diff --git a/src/server/config/locales/en.json b/src/server/config/locales/en.json new file mode 100644 index 0000000..5989bd9 --- /dev/null +++ b/src/server/config/locales/en.json @@ -0,0 +1,4 @@ +{ + "Welcome": "Welcome", + "A brand new app.": "A brand new app." +} diff --git a/src/server/config/locales/es.json b/src/server/config/locales/es.json new file mode 100644 index 0000000..bc6edbf --- /dev/null +++ b/src/server/config/locales/es.json @@ -0,0 +1,4 @@ +{ + "Welcome": "Bienvenido", + "A brand new app.": "Una nueva aplicación." +} diff --git a/src/server/config/locales/fr.json b/src/server/config/locales/fr.json new file mode 100644 index 0000000..b599740 --- /dev/null +++ b/src/server/config/locales/fr.json @@ -0,0 +1,4 @@ +{ + "Welcome": "Bienvenue", + "A brand new app.": "Une toute nouvelle application." +} diff --git a/src/server/config/log.js b/src/server/config/log.js new file mode 100644 index 0000000..1ef07f5 --- /dev/null +++ b/src/server/config/log.js @@ -0,0 +1,29 @@ +/** + * Built-in Log Configuration + * (sails.config.log) + * + * Configure the log level for your app, as well as the transport + * (Underneath the covers, Sails uses Winston for logging, which + * allows for some pretty neat custom transports/adapters for log messages) + * + * For more information on the Sails logger, check out: + * https://sailsjs.com/docs/concepts/logging + */ + +module.exports.log = { + + /*************************************************************************** + * * + * Valid `level` configs: i.e. the minimum log level to capture with * + * sails.log.*() * + * * + * The order of precedence for log levels from lowest to highest is: * + * silly, verbose, info, debug, warn, error * + * * + * You may also set the level to "silent" to suppress all logs. * + * * + ***************************************************************************/ + + // level: 'info' + +}; diff --git a/src/server/config/models.js b/src/server/config/models.js new file mode 100644 index 0000000..340878b --- /dev/null +++ b/src/server/config/models.js @@ -0,0 +1,124 @@ +/** + * Default model settings + * (sails.config.models) + * + * Your default, project-wide model settings. Can also be overridden on a + * per-model basis by setting a top-level properties in the model definition. + * + * For details about all available model settings, see: + * https://sailsjs.com/config/models + * + * For more general background on Sails model settings, and how to configure + * them on a project-wide or per-model basis, see: + * https://sailsjs.com/docs/concepts/models-and-orm/model-settings + */ + +module.exports.models = { + + + /*************************************************************************** + * * + * Whether model methods like `.create()` and `.update()` should ignore * + * (and refuse to persist) unrecognized data-- i.e. properties other than * + * those explicitly defined by attributes in the model definition. * + * * + * To ease future maintenance of your code base, it is usually a good idea * + * to set this to `true`. * + * * + * > Note that `schema: false` is not supported by every database. * + * > For example, if you are using a SQL database, then relevant models * + * > are always effectively `schema: true`. And if no `schema` setting is * + * > provided whatsoever, the behavior is left up to the database adapter. * + * > * + * > For more info, see: * + * > https://sailsjs.com/docs/concepts/orm/model-settings#?schema * + * * + ***************************************************************************/ + + // schema: true, + + + /*************************************************************************** + * * + * How and whether Sails will attempt to automatically rebuild the * + * tables/collections/etc. in your schema. * + * * + * > Note that, when running in a production environment, this will be * + * > automatically set to `migrate: 'safe'`, no matter what you configure * + * > here. This is a failsafe to prevent Sails from accidentally running * + * > auto-migrations on your production database. * + * > * + * > For more info, see: * + * > https://sailsjs.com/docs/concepts/orm/model-settings#?migrate * + * * + ***************************************************************************/ + + // migrate: 'alter', + + + /*************************************************************************** + * * + * Base attributes that are included in all of your models by default. * + * By convention, this is your primary key attribute (`id`), as well as two * + * other timestamp attributes for tracking when records were last created * + * or updated. * + * * + * > For more info, see: * + * > https://sailsjs.com/docs/concepts/orm/model-settings#?attributes * + * * + ***************************************************************************/ + + attributes: { + createdAt: { type: 'number', autoCreatedAt: true, }, + updatedAt: { type: 'number', autoUpdatedAt: true, }, + id: { type: 'number', autoIncrement: true, }, + //-------------------------------------------------------------------------- + // /\ Using MongoDB? + // || Replace `id` above with this instead: + // + // ``` + // id: { type: 'string', columnName: '_id' }, + // ``` + // + // Plus, don't forget to configure MongoDB as your default datastore: + // https://sailsjs.com/docs/tutorials/using-mongo-db + //-------------------------------------------------------------------------- + }, + + + /****************************************************************************** + * * + * The set of DEKs (data encryption keys) for at-rest encryption. * + * i.e. when encrypting/decrypting data for attributes with `encrypt: true`. * + * * + * > The `default` DEK is used for all new encryptions, but multiple DEKs * + * > can be configured to allow for key rotation. In production, be sure to * + * > manage these keys like you would any other sensitive credential. * + * * + * > For more info, see: * + * > https://sailsjs.com/docs/concepts/orm/model-settings#?dataEncryptionKeys * + * * + ******************************************************************************/ + + dataEncryptionKeys: { + default: 'YbQ+khlOLfBdyyXZF2Ms7Hw6HETk/C4oTuUvfGeaHew=' + }, + + + /*************************************************************************** + * * + * Whether or not implicit records for associations should be cleaned up * + * automatically using the built-in polyfill. This is especially useful * + * during development with sails-disk. * + * * + * Depending on which databases you're using, you may want to disable this * + * polyfill in your production environment. * + * * + * (For production configuration, see `config/env/production.js`.) * + * * + ***************************************************************************/ + + cascadeOnDestroy: true + + +}; diff --git a/src/server/config/policies.js b/src/server/config/policies.js new file mode 100644 index 0000000..c4d1bb5 --- /dev/null +++ b/src/server/config/policies.js @@ -0,0 +1,22 @@ +/** + * Policy Mappings + * (sails.config.policies) + * + * Policies are simple functions which run **before** your actions. + * + * For more information on configuring policies, check out: + * https://sailsjs.com/docs/concepts/policies + */ + +module.exports.policies = { + + /*************************************************************************** + * * + * Default policy for all controllers and actions, unless overridden. * + * (`true` allows public access) * + * * + ***************************************************************************/ + + // '*': true, + +}; diff --git a/src/server/config/routes.js b/src/server/config/routes.js new file mode 100644 index 0000000..ec74901 --- /dev/null +++ b/src/server/config/routes.js @@ -0,0 +1,14 @@ +/** + * Route Mappings + * (sails.config.routes) + * + * Your routes tell Sails what to do each time it receives a request. + * + * For more information on configuring custom routes, check out: + * https://sailsjs.com/anatomy/config/routes-js + */ + +module.exports.routes = { + + +}; diff --git a/src/server/config/security.js b/src/server/config/security.js new file mode 100644 index 0000000..bd57631 --- /dev/null +++ b/src/server/config/security.js @@ -0,0 +1,54 @@ +/** + * Security Settings + * (sails.config.security) + * + * These settings affect aspects of your app's security, such + * as how it deals with cross-origin requests (CORS) and which + * routes require a CSRF token to be included with the request. + * + * For an overview of how Sails handles security, see: + * https://sailsjs.com/documentation/concepts/security + * + * For additional options and more information, see: + * https://sailsjs.com/config/security + */ + +module.exports.security = { + + /*************************************************************************** + * * + * CORS is like a more modern version of JSONP-- it allows your application * + * to circumvent browsers' same-origin policy, so that the responses from * + * your Sails app hosted on one domain (e.g. example.com) can be received * + * in the client-side JavaScript code from a page you trust hosted on _some * + * other_ domain (e.g. trustedsite.net). * + * * + * For additional options and more information, see: * + * https://sailsjs.com/docs/concepts/security/cors * + * * + ***************************************************************************/ + + // cors: { + // allRoutes: false, + // allowOrigins: '*', + // allowCredentials: false, + // }, + + + /**************************************************************************** + * * + * By default, Sails' built-in CSRF protection is disabled to facilitate * + * rapid development. But be warned! If your Sails app will be accessed by * + * web browsers, you should _always_ enable CSRF protection before deploying * + * to production. * + * * + * To enable CSRF protection, set this to `true`. * + * * + * For more information, see: * + * https://sailsjs.com/docs/concepts/security/csrf * + * * + ****************************************************************************/ + + // csrf: false + +}; diff --git a/src/server/config/session.js b/src/server/config/session.js new file mode 100644 index 0000000..3b4a800 --- /dev/null +++ b/src/server/config/session.js @@ -0,0 +1,39 @@ +/** + * Session Configuration + * (sails.config.session) + * + * Use the settings below to configure session integration in your app. + * (for additional recommended settings, see `config/env/production.js`) + * + * For all available options, see: + * https://sailsjs.com/config/session + */ + +module.exports.session = { + + /*************************************************************************** + * * + * Session secret is automatically generated when your new app is created * + * Replace at your own risk in production-- you will invalidate the cookies * + * of your users, forcing them to log in again. * + * * + ***************************************************************************/ + secret: 'be16b52894d6ce75eb828ccab1520980', + + + /*************************************************************************** + * * + * Customize when built-in session support will be skipped. * + * * + * (Useful for performance tuning; particularly to avoid wasting cycles on * + * session management when responding to simple requests for static assets, * + * like images or stylesheets.) * + * * + * https://sailsjs.com/config/session * + * * + ***************************************************************************/ + // isSessionDisabled: function (req){ + // return !!req.path.match(req._sails.LOOKS_LIKE_ASSET_RX); + // }, + +}; diff --git a/src/server/config/sockets.js b/src/server/config/sockets.js new file mode 100644 index 0000000..9f466a0 --- /dev/null +++ b/src/server/config/sockets.js @@ -0,0 +1,82 @@ +/** + * WebSocket Server Settings + * (sails.config.sockets) + * + * Use the settings below to configure realtime functionality in your app. + * (for additional recommended settings, see `config/env/production.js`) + * + * For all available options, see: + * https://sailsjs.com/config/sockets + */ + +module.exports.sockets = { + + /*************************************************************************** + * * + * `transports` * + * * + * The protocols or "transports" that socket clients are permitted to * + * use when connecting and communicating with this Sails application. * + * * + * > Never change this here without also configuring `io.sails.transports` * + * > in your client-side code. If the client and the server are not using * + * > the same array of transports, sockets will not work properly. * + * > * + * > For more info, see: * + * > https://sailsjs.com/docs/reference/web-sockets/socket-client * + * * + ***************************************************************************/ + + // transports: [ 'websocket' ], + + + /*************************************************************************** + * * + * `beforeConnect` * + * * + * This custom beforeConnect function will be run each time BEFORE a new * + * socket is allowed to connect, when the initial socket.io handshake is * + * performed with the server. * + * * + * https://sailsjs.com/config/sockets#?beforeconnect * + * * + ***************************************************************************/ + + // beforeConnect: function(handshake, proceed) { + // + // // `true` allows the socket to connect. + // // (`false` would reject the connection) + // return proceed(undefined, true); + // + // }, + + + /*************************************************************************** + * * + * `afterDisconnect` * + * * + * This custom afterDisconnect function will be run each time a socket * + * disconnects * + * * + ***************************************************************************/ + + // afterDisconnect: function(session, socket, done) { + // + // // By default: do nothing. + // // (but always trigger the callback) + // return done(); + // + // }, + + + /*************************************************************************** + * * + * Whether to expose a 'GET /__getcookie' route that sets an HTTP-only * + * session cookie. * + * * + ***************************************************************************/ + + // grant3rdPartyCookie: true, + + +}; diff --git a/src/server/config/views.js b/src/server/config/views.js new file mode 100644 index 0000000..55d0f92 --- /dev/null +++ b/src/server/config/views.js @@ -0,0 +1,41 @@ +/** + * View Engine Configuration + * (sails.config.views) + * + * Server-sent views are a secure and effective way to get your app up + * and running. Views are normally served from actions. Below, you can + * configure your templating language/framework of choice and configure + * Sails' layout support. + * + * For details on available options for configuring server-side views, check out: + * https://sailsjs.com/config/views + * + * For more background information on views and partials in Sails, check out: + * https://sailsjs.com/docs/concepts/views + */ + +module.exports.views = { + + /*************************************************************************** + * * + * Extension to use for your views. When calling `res.view()` in an action, * + * you can leave this extension off. For example, calling * + * `res.view('homepage')` will (using default settings) look for a * + * `views/homepage.ejs` file. * + * * + ***************************************************************************/ + + // extension: 'ejs', + + /*************************************************************************** + * * + * The path (relative to the views directory, and without extension) to * + * the default layout file to use, or `false` to disable layouts entirely. * + * * + * Note that layouts only work with the built-in EJS view engine! * + * * + ***************************************************************************/ + + layout: 'layouts/layout' + +}; diff --git a/src/server/package-lock.json b/src/server/package-lock.json new file mode 100644 index 0000000..73d8ade --- /dev/null +++ b/src/server/package-lock.json @@ -0,0 +1,3192 @@ +{ + "name": "server", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", + "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true + }, + "@babel/highlight": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", + "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@sailshq/binary-search-tree": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@sailshq/binary-search-tree/-/binary-search-tree-0.2.7.tgz", + "integrity": "sha512-4q7A4I0cYzRRrPUA/mZYFQ3My26RAyWQ10IfdgHaBC6M1ZNCUpQnT7vRMZd5KgnlUBl8MSlP4JUbL5heeSHMBw==", + "requires": { + "underscore": "1.13.1" + } + }, + "@sailshq/lodash": { + "version": "3.10.4", + "resolved": "https://registry.npmjs.org/@sailshq/lodash/-/lodash-3.10.4.tgz", + "integrity": "sha512-YXJqp9gdHcZKAmBY/WnwFpPtNQp2huD/ME2YMurH2YHJvxrVzYsmpKw/pb7yINArRpp8E++fwbQd3ajYXGA45Q==" + }, + "@sailshq/nedb": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@sailshq/nedb/-/nedb-1.8.2.tgz", + "integrity": "sha512-qCViMLdh5WWIWEP9ARiSZTjQ1fSEwXsd6eYkD04WIrOt6uHRVF9k5bGnDQPKvTdlCVBTzxUZhPb7VC3+BKw21g==", + "requires": { + "@sailshq/binary-search-tree": "0.2.7", + "async": "0.2.10", + "localforage": "1.3.0", + "mkdirp": "0.5.6", + "underscore": "1.13.1" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ==" + } + } + }, + "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" + } + }, + "acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true + }, + "after": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "integrity": "sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==" + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "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" + } + }, + "anchor": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/anchor/-/anchor-1.4.1.tgz", + "integrity": "sha512-T4rWOGuI+pjf0KgrnLMWrHBIsLCxf6HQ2OgXboMs4QAf7ogvbqIYwCLR7k7BBeTBvrmyDv1M6mZDSUl2pKLMkw==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "validator": "13.7.0" + } + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==" + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + } + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "arraybuffer.slice": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==" + }, + "asap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/asap/-/asap-1.0.0.tgz", + "integrity": "sha512-Ej9qjcXY+8Tuy1cNqiwNMwFRXOy9UwgTeMA8LxreodygIPV48lx8PU1ecFxb5ZeU1DpMKxiq6vGLTxcitWZPbA==" + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "requires": { + "lodash": "^4.17.14" + } + }, + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==" + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base64-arraybuffer": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", + "integrity": "sha512-a1eIFi4R9ySrbiMuyTGx5e92uRH5tQY6kArNcFaKBUleIoLjdjBg7Zxm3Mqm3Kmkf27HLR/1fnxX9q8GQ7Iavg==" + }, + "base64id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==" + }, + "blob": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", + "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==" + }, + "bluebird": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.2.1.tgz", + "integrity": "sha512-OfdwXncy2KqoGIlXUqxe+xb7G54s8y5pdo96+KGQMkQMZ5C/rT26tT2IJxWtgiAPeklwAU6iXxxjX8b8blcTPQ==" + }, + "body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==", + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.8.1", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.9.7", + "raw-body": "2.4.3", + "type-is": "~1.6.18" + }, + "dependencies": { + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, + "http-errors": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==" + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + } + } + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==" + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==" + }, + "captains-log": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/captains-log/-/captains-log-2.0.3.tgz", + "integrity": "sha512-hKlNLw/4Qz1vPDhAbn3pRexi8fzY7d3SwX/BtI2lMG09UqK1W1mf2pYFslau3ZPWxdcwBBcsLLi9ngs+xhqD2Q==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "chalk": "1.1.3", + "rc": "1.2.8", + "semver": "5.4.1" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + } + } + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "requires": { + "ansi-styles": "^3.1.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha512-ycQR/UbvI9xIlEdQT1TQqwoXtEldExbCEAJgRo5YXlmSKjv6ThHnP9/vwGa1gr19Gfw+LkFd7KqYMhzrRC5JYw==", + "requires": { + "has-flag": "^2.0.0" + } + } + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" + }, + "common-js-file-extensions": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/common-js-file-extensions/-/common-js-file-extensions-1.0.2.tgz", + "integrity": "sha512-unB33lDBJbuMtc6dqm6SZbHbIu+uR2+zlv+DCO6bfjdvrMdn2GSKZTbKpLnbYpJS+GLq49U8prq5FPfL8QVrtA==" + }, + "component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==" + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==" + }, + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "requires": { + "mime-db": ">= 1.43.0 < 2" + } + }, + "compression": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.1.tgz", + "integrity": "sha512-Mp6cFKqe7O3Y5X4CQDeKLJgi1vrimySE7p2jTYIr8Z7N+uOamR0wrbkP4/0q3VPbEhNhnHEknPC0/EDp7mwfig==", + "requires": { + "accepts": "~1.3.4", + "bytes": "3.0.0", + "compressible": "~2.0.11", + "debug": "2.6.9", + "on-headers": "~1.0.1", + "safe-buffer": "5.1.1", + "vary": "~1.1.2" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "connect": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.5.tgz", + "integrity": "sha512-B+WTJ0bDgjQugnbNF7fWGvwEgTj9Isdk3Y7yTZlgCuVe+hpl/do8frEMeimx7sRMPW3oZA+EsC9uDZL8MaaAwQ==", + "requires": { + "debug": "2.6.9", + "finalhandler": "1.0.6", + "parseurl": "~1.3.2", + "utils-merge": "1.0.1" + } + }, + "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" + }, + "dependencies": { + "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==" + } + } + }, + "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.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-parser": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.4.tgz", + "integrity": "sha512-lo13tqF3JEtFO7FyA49CqbhaFkskRJ0u/UAiINgrIXeRCY41c88/zxtrECl8AKH3B0hj9q10+h3Kt8I7KlW4tw==", + "requires": { + "cookie": "0.3.1", + "cookie-signature": "1.0.6" + }, + "dependencies": { + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha512-+IJOX0OqlHCszo2mBUq+SrEbCj6w7Kpffqx60zYbPTFaO4+yYgRjHwcZNpWvaTylDHaV7PPmBHzSecZiMhtPgw==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + } + } + }, + "cookie-signature": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.1.0.tgz", + "integrity": "sha512-Alvs19Vgq07eunykd3Xy2jF0/qSNv2u7KDbAek9H5liV1UMijbqFs5cycZvv5dVsvseT/U4H8/7/w8Koh35C4A==" + }, + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha512-yAXz/pA1tD8Gtg2S98Ekf/sewp3Lcp3YoFKJ4Hkp5h5yLWnKVTDU0kwjKJ8NDCYcfTLfyGkzTikst+jWypT1iA==", + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "csrf": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csrf/-/csrf-3.1.0.tgz", + "integrity": "sha512-uTqEnCvWRk042asU6JtapDTcJeeailFy4ydOQS28bj1hcLnYRiqi8SsD2jS412AY1I/4qdOwWZun774iqywf9w==", + "requires": { + "rndm": "1.2.0", + "tsscmp": "1.0.6", + "uid-safe": "2.1.5" + } + }, + "csurf": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/csurf/-/csurf-1.10.0.tgz", + "integrity": "sha512-fh725p0R83wA5JukCik5hdEko/LizW/Vl7pkKDa1WJUVCosg141mqaAWCScB+nkEaRMFMGbutHMOr6oBNc/j9A==", + "requires": { + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "csrf": "3.1.0", + "http-errors": "~1.7.2" + }, + "dependencies": { + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha512-+IJOX0OqlHCszo2mBUq+SrEbCj6w7Kpffqx60zYbPTFaO4+yYgRjHwcZNpWvaTylDHaV7PPmBHzSecZiMhtPgw==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + } + } + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha512-TVF6svNzeQCOpjCqsy0/CSy8VgObG3wXusJ73xW2GbG5rGx7lC8zxDSURicsXI2UsGdi2L0QNRCi745/wUDvsA==" + }, + "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" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==" + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "denque": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", + "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==" + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "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==" + }, + "ejs": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", + "integrity": "sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==", + "requires": { + "jake": "^10.8.5" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + }, + "encrypted-attr": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/encrypted-attr/-/encrypted-attr-1.0.6.tgz", + "integrity": "sha512-12WE8GDkbhKcGmVp6+TyJXCcFj9NF7db33nutjOSBLlMuYY4oCGricgTEUAuRSI1xLeE1nhoDD6jSx20WgFVYg==", + "requires": { + "lodash": "^4.17.4" + } + }, + "engine.io": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.6.1.tgz", + "integrity": "sha512-dfs8EVg/i7QjFsXxn7cCRQ+Wai1G1TlEvHhdYEi80fxn5R1vZ2K661O6v/rezj1FP234SZ14r9CmJke99iYDGg==", + "requires": { + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "debug": "~4.1.0", + "engine.io-parser": "~2.2.0", + "ws": "~7.4.2" + }, + "dependencies": { + "cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==" + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "engine.io-client": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.3.tgz", + "integrity": "sha512-qsgyc/CEhJ6cgMUwxRRtOndGVhIu5hpL5tR4umSpmX/MvkFoIxUTM7oFMDQumHNzlNLwSVy6qhstFPoWTf7dOw==", + "requires": { + "component-emitter": "~1.3.0", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.2.0", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "ws": "~7.4.2", + "xmlhttprequest-ssl": "~1.6.2", + "yeast": "0.1.2" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "engine.io-parser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz", + "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==", + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.4", + "blob": "0.0.5", + "has-binary2": "~1.0.2" + } + }, + "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==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" + }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.9.1", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.3", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^5.0.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.2.2", + "js-yaml": "^3.13.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" + }, + "express": { + "version": "4.17.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.3.tgz", + "integrity": "sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg==", + "requires": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.19.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.4.2", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.9.7", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.17.2", + "serve-static": "1.14.2", + "setprototypeof": "1.2.0", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "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==" + }, + "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==" + }, + "serve-static": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", + "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.2" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==" + } + } + }, + "express-session": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.0.tgz", + "integrity": "sha512-t4oX2z7uoSqATbMfsxWMbNjAL0T5zpvcJCk3Z9wnPPN7ibddhnmDZXHfEcoBMG2ojKXZoCyPMc5FbtK+G7SoDg==", + "requires": { + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-headers": "~1.0.2", + "parseurl": "~1.3.3", + "safe-buffer": "5.2.0", + "uid-safe": "~2.1.5" + }, + "dependencies": { + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==" + }, + "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==", + "dev": true + }, + "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==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "fd-slicer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", + "integrity": "sha512-MX1ZLPIuKED51hrI4++K+1B0VX87Cs4EkybD2q12Ysuf5p4vkmHqMvQJRlDwROqFr4D2Pzyit5wGQxf30grIcw==", + "requires": { + "pend": "~1.2.0" + } + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "requires": { + "minimatch": "^5.0.1" + }, + "dependencies": { + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, + "finalhandler": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.6.tgz", + "integrity": "sha512-immlyyYCPWG2tajlYBhZ6cjLAv1QAclU8tKS0d27ZtPqm/+iddy16GT3xLExg+V4lIETLpPwaYQAlZHNE//dPA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "dependencies": { + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "flaverr": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/flaverr/-/flaverr-1.10.0.tgz", + "integrity": "sha512-POaguCzNjWKEKsBkks4YGgNv1LVUqTX4MTudca5ArQAxtBrPswQLAW8la4Hbo0EZy9tpU3a9WwsKdAACqZnE/Q==", + "requires": { + "@sailshq/lodash": "^3.10.2" + } + }, + "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-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha512-8tLu60LgxF6XpdbK8OW3FA+IfTNBn1ZHGHKF4KQbEeSkajYw5PlYJcKluntgegDPTg8UkHjpet1T82vk6TQ68w==" + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-binary2": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", + "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "requires": { + "isarray": "2.0.1" + }, + "dependencies": { + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==" + } + } + }, + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha512-g5VNKdkFuUuVCP9gYfDJHjK2nqdQJ7aDLTnycnc2+RvsOQbuLdF5pm7vuE5J76SEBIQjs4kQY/BWq74JUmjbXA==" + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha512-P+1n3MnwjR/Epg9BBo1KT8qbye2g2Ou4sFumihwt6I4tsUX7jnLcX4BTOSKg/B1ZrIYMN9FcEnG4x5a7NB8Eng==" + }, + "http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==" + } + } + }, + "i18n-2": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/i18n-2/-/i18n-2-0.7.3.tgz", + "integrity": "sha512-NiC0dd+VAVGq/hWsK19XCTwfx7Xr0KPtldQ11/9DHY8Ic4++bbgRhjCvRD1C/K09V7UZpwgVhQuzPPom9XVrOQ==", + "requires": { + "debug": "^3.1.0", + "sprintf-js": "^1.1.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "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" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "include-all": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/include-all/-/include-all-4.0.3.tgz", + "integrity": "sha512-Wl+D+ZWe8jOQXnkdy0Zu0V6R5NAmJto7ChuDnfV5YFIZnmgye87e/1c0/lE523nc9NOiJveSz+F0abM+OWpY3A==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "merge-dictionaries": "^0.0.3" + }, + "dependencies": { + "merge-dictionaries": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/merge-dictionaries/-/merge-dictionaries-0.0.3.tgz", + "integrity": "sha512-7KnOdGPqHF7ZeBqNtOskSmAJKVlgwla5km2ToavXP7ZJ761JvcSf15cjkrSD+FNuhAvKUGsFKkL9ynBvnCRTZA==", + "requires": { + "@sailshq/lodash": "^3.10.2" + } + } + } + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "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-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==" + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "jake": { + "version": "10.8.7", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", + "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", + "requires": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "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==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "localforage": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.3.0.tgz", + "integrity": "sha512-ImiUj+yiF3S2X4CE0S8q55nbaDXTLhUAECW87UFq0WXPdiQUKKzznyfeFSKCqCqX2Lg/SuLYFS/l/i02YTgyJA==", + "requires": { + "promise": "^5.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.issafeinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.issafeinteger/-/lodash.issafeinteger-4.0.4.tgz", + "integrity": "sha512-VyybxpvKqtJKs4+RibsKP1qqbFsTZ6aKDsJfzqrobfMrzMRCHhXAMlKWGKD7QHy2OwGSuKuzSAv8pDyi62huWQ==" + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "machine": { + "version": "15.2.2", + "resolved": "https://registry.npmjs.org/machine/-/machine-15.2.2.tgz", + "integrity": "sha512-gXA/U4bjMyQd2QPw8i+AxzXEDkQBImQVE2P7mmTmXPcfszT+NJc5Me0I1Tn6Fj8zsO5EsmsFxD8Xdia751ik/w==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "anchor": "^1.2.0", + "flaverr": "^1.7.0", + "parley": "^3.8.0", + "rttc": "^10.0.0-3" + } + }, + "machine-as-action": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/machine-as-action/-/machine-as-action-10.3.1.tgz", + "integrity": "sha512-IrX+kSjt4XQTxmZ+7/SJUvRJbwcZ2BqFlwwXLZIjYQmKTyd0vV4ZmKdbNZtrEKD1ZmqgtKSgHaxBET+XQU333A==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "flaverr": "^1.5.1", + "machine": "^15.2.2", + "rttc": "^10.0.0-4", + "streamifier": "0.1.1" + } + }, + "machinepack-fs": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/machinepack-fs/-/machinepack-fs-12.0.1.tgz", + "integrity": "sha512-5Hao0wOgLwUljQtmWKZDYbXNX29Otav9v5S8hxA43H2UP6KT3xFSE4cwwkBB9jHppgYtMqwGa0Q9TFC07hjFkg==", + "requires": { + "fs-extra": "0.30.0", + "machine": "^15.0.0-12", + "walker": "1.0.7" + } + }, + "machinepack-process": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/machinepack-process/-/machinepack-process-4.0.1.tgz", + "integrity": "sha512-/5dqpWVhNjRC78v4cOKMH2I74u3hbM4pVha0SEh427eddWLSDt41txECZh+HLPPD3h/r35UU0cKszIFxqZYJlA==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "machine": "^15.0.0-23", + "opn": "5.3.0" + } + }, + "machinepack-redis": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/machinepack-redis/-/machinepack-redis-2.0.7.tgz", + "integrity": "sha512-8VzJGbMVEirGiWjp0wgKMt929gGcJRnbCrQl0D05DfYYIzheMlovxKmVWeWXQqzjuRQqIW4LC4q4vtBQLUlArg==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "async": "2.6.4", + "flaverr": "^1.9.2", + "machine": "^15.2.2", + "redis": "3.1.1" + } + }, + "machinepack-urls": { + "version": "6.0.2-0", + "resolved": "https://registry.npmjs.org/machinepack-urls/-/machinepack-urls-6.0.2-0.tgz", + "integrity": "sha512-777UDtPvgDG2XxekkQnjQi6tHgg3uepbjWZFw82isxyMThhsNdrwzaZd9hkupxcECrThw5OuPEsL963ya+SA3w==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "machine": "^15.0.0-2" + } + }, + "makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "requires": { + "tmpl": "1.0.5" + } + }, + "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-defaults": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/merge-defaults/-/merge-defaults-0.2.2.tgz", + "integrity": "sha512-rKkxPFgGDZfmen0IN8BKRsGEbFU3PdO0RhR1GjOk+BLJF7+LAIhs5bUG3s26FkbB5bfIn9il25KkntRGdqHQ3A==", + "requires": { + "@sailshq/lodash": "^3.10.2" + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "merge-dictionaries": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/merge-dictionaries/-/merge-dictionaries-1.0.0.tgz", + "integrity": "sha512-5MpJgYdi5Loor97U3ixSBZhUjaDGIOa9tmvQYT9iYKXTeSJFuE4aVcwpBJdNRa76sJyHGqEh7LH3wbtmhpIg0A==", + "requires": { + "@sailshq/lodash": "^3.10.2" + } + }, + "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" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + } + } + }, + "minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "requires": { + "minimist": "^1.2.6" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "multiparty": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/multiparty/-/multiparty-4.1.3.tgz", + "integrity": "sha512-Qhty41IpN0IuoBstlVPhdgqtnwrsj0gE7ndajbtUVE0f2UTT/2ChmZZnS5Nsf4a5H+5C68V/tN2vi6Wcvhn00Q==", + "requires": { + "fd-slicer": "~1.0.1" + } + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "opn": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", + "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", + "requires": { + "is-wsl": "^1.1.0" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true + }, + "parasails": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/parasails/-/parasails-0.9.3.tgz", + "integrity": "sha512-tX9sf+qDXE3NqZ8XhXai4dDSiVq8Z5FOttWH7tYuwiYwh9ZpPqFEf7W4Lx3A19e0P1D5FPuw1jNRWe3JMv9sQg==" + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parley": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/parley/-/parley-3.8.3.tgz", + "integrity": "sha512-9fSqT4J0jRNh+F/5EAqZvUSq232xjFXZJ3rXgKUXbIUUZ0ZPj6VjW83mI5UpVP8PMGHF3I8xycmvNjs9nQ3O8g==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "bluebird": "3.2.1", + "flaverr": "^1.5.1" + } + }, + "parseqs": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", + "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==" + }, + "parseuri": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", + "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==" + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha512-DjIMrEiCuzD/Xsr69WhcPCTeb6iZP5JgL/DZ3cYz0zMnyiXiscoqC6LLV2dYwQHfy9O+twCDVVPiFWb7xZhaOw==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.5.3.tgz", + "integrity": "sha512-bqgexHATMvdKmLuLFDxO7cEy6zGYVuURhAbJZYVbBR6XnX4KmXXBOt0OKVaDGOJ5l5UY86OXpKE2RHD30TbbOQ==", + "requires": { + "isarray": "0.0.1" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" + }, + "pluralize": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", + "integrity": "sha512-TH+BeeL6Ct98C7as35JbZLf8lgsRzlNJb5gklRIGHKaPkGl1esOKBc5ALUMd+q08Sr6tiEKM+Icbsxg5vuhMKQ==" + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-5.0.0.tgz", + "integrity": "sha512-N2BfLz0Sigf7rsm5NnItRwTNqEDUF2ephwEXTcOAf2cO9NwZ9TnIjOmnQNtC0r70CV0S1+uc9mSMmFH7gxk87Q==", + "requires": { + "asap": "~1.0.0" + } + }, + "prompt": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prompt/-/prompt-1.2.1.tgz", + "integrity": "sha512-B4+2QeNDn5Cdp4kK2iOwV8qvrWpiPKlZKI9ZKkPl0C9KgeMW6DyWWqhqHiFq9vZf6zTniv+rYalK0ZlgktSwiw==", + "requires": { + "async": "~0.9.0", + "colors": "1.4.0", + "read": "1.0.x", + "revalidator": "0.1.x", + "winston": "2.x" + }, + "dependencies": { + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" + } + } + }, + "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" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==" + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true + }, + "qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==" + }, + "random-bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", + "integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==" + }, + "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.4.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.3.tgz", + "integrity": "sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g==", + "requires": { + "bytes": "3.1.2", + "http-errors": "1.8.1", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, + "http-errors": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==" + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + } + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", + "requires": { + "mute-stream": "~0.0.4" + } + }, + "redis": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/redis/-/redis-3.1.1.tgz", + "integrity": "sha512-QhkKhOuzhogR1NDJfBD34TQJz2ZJwDhhIC6ZmvpftlmfYShHHQXjjNspAJ+Z2HH5NwSBVYBVganbiZ8bgFMHjg==", + "requires": { + "denque": "^1.5.0", + "redis-commands": "^1.7.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0" + } + }, + "redis-commands": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.7.0.tgz", + "integrity": "sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ==" + }, + "redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==" + }, + "redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", + "requires": { + "redis-errors": "^1.0.0" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "reportback": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/reportback/-/reportback-2.0.2.tgz", + "integrity": "sha512-EOF6vRKfXjI7ydRoOdXXeRTK1zgWq7mep8/32patt0FOnBap32eTSw6yCea/o0025PHmVB8crx5OxzZJ+/P34g==", + "requires": { + "captains-log": "^2.0.2", + "switchback": "^2.0.1" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "revalidator": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", + "integrity": "sha512-xcBILK2pA9oh4SiinPEZfhP8HfrB/ha+a2fTMyl7Om2WjlDVrOQy99N2MXXlUHqGJz4qEu2duXxHJjDWuK/0xg==" + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "rndm": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz", + "integrity": "sha512-fJhQQI5tLrQvYIYFpOnFinzv9dwmR7hRnUz1XqP3OJ1jIweTNOd6aTO4jwQSgcBSFUB+/KHJxuGneime+FdzOw==" + }, + "router": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/router/-/router-1.3.2.tgz", + "integrity": "sha512-HyiHMDfHAmKe+k3fiHjiM33fFl9KITVhCyR6qqSPYyv308hghR7k5LapZlAUuYjkcnx1q36lZ/Ab/i3GrlVqTQ==", + "requires": { + "array-flatten": "2.1.1", + "debug": "2.6.9", + "methods": "~1.1.2", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "setprototypeof": "1.1.0", + "utils-merge": "1.0.1" + }, + "dependencies": { + "array-flatten": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", + "integrity": "sha512-Ylfqm/V1V/VKGazsJeRDZ31wV9gdNeK3ZsvwbYBAVSNgH8o8CMLfdx/ofn9pnMVsvTMfvC3yfcBYzGpD1vxnlw==" + }, + "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==" + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + } + } + }, + "rttc": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/rttc/-/rttc-10.0.1.tgz", + "integrity": "sha512-wBsGNVaZ8K1qG0n5jxQ7dnOpvpewyQHGIjbMFYx8D16+51MM+FwkZwDPgH4GtnaTSzrNvrJriXFyvDi7OTZQ0A==", + "requires": { + "@sailshq/lodash": "^3.10.2" + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sails": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/sails/-/sails-1.5.4.tgz", + "integrity": "sha512-Z2rh9x/hkuNzRleAzmJaj1u0AoakYEtHyOgLmygvnwCEZH0fspqJyEIXTKz0X54fumdyea7anp4ZLlkbflYICg==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "async": "2.6.4", + "captains-log": "^2.0.0", + "chalk": "2.3.0", + "commander": "2.11.0", + "common-js-file-extensions": "1.0.2", + "compression": "1.7.1", + "connect": "3.6.5", + "cookie": "0.4.0", + "cookie-parser": "1.4.4", + "cookie-signature": "1.1.0", + "csurf": "1.10.0", + "ejs": "3.1.7", + "express": "4.17.3", + "express-session": "1.17.0", + "flaverr": "^1.10.0", + "glob": "7.1.2", + "i18n-2": "0.7.3", + "include-all": "^4.0.0", + "machine": "^15.2.2", + "machine-as-action": "^10.3.1", + "machinepack-process": "^4.0.1", + "machinepack-redis": "^2.0.2", + "merge-defaults": "0.2.2", + "merge-dictionaries": "1.0.0", + "minimist": "1.2.6", + "parley": "^3.3.4", + "parseurl": "1.3.2", + "path-to-regexp": "1.5.3", + "pluralize": "1.2.1", + "prompt": "1.2.1", + "rc": "1.2.8", + "router": "1.3.2", + "rttc": "^10.0.0-0", + "sails-generate": "^2.0.3", + "sails-stringfile": "^0.3.3", + "semver": "4.3.6", + "serve-favicon": "2.4.5", + "serve-static": "1.13.1", + "skipper": "^0.9.0-0", + "sort-route-addresses": "^0.0.4", + "uid-safe": "2.1.5", + "vary": "1.1.2", + "whelk": "^6.0.1" + } + }, + "sails-disk": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/sails-disk/-/sails-disk-2.1.2.tgz", + "integrity": "sha512-WOrvlhR3pxl93BK8PZD232UwQxq93rkjsuVpJ46I0Fs4CtFFYSQW+so+0PN3F7mW6znJHv+Uk4wRvpfHqbYLNQ==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "@sailshq/nedb": "^1.8.2", + "async": "2.6.4", + "flaverr": "^1.10.0", + "machinepack-fs": "^12.0.1" + } + }, + "sails-generate": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/sails-generate/-/sails-generate-2.0.8.tgz", + "integrity": "sha512-uB3KQGHcMt3NpA26CTPgVDdFc1gNCKMhZHM4wyUASJoWPNbulZNjNdx/nj6A88Hr1VOSIs++9xpL/v654AAGhw==", + "requires": { + "@sailshq/lodash": "^3.10.3", + "async": "2.6.4", + "chalk": "1.1.3", + "cross-spawn": "4.0.2", + "flaverr": "^1.0.0", + "fs-extra": "0.30.0", + "machinepack-process": "^4.0.0", + "parasails": "^0.9.2", + "read": "1.0.7", + "reportback": "^2.0.1", + "sails.io.js-dist": "^1.0.0" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + } + } + }, + "sails-hook-orm": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/sails-hook-orm/-/sails-hook-orm-4.0.2.tgz", + "integrity": "sha512-uNB1SW3thRyGo0KH0W+FTNMrKl/iGAayJedlMZmEsy3HbioI3sCiI0rDaL/gR4eWAoj3w2ZeUbl7NMpsuVvxoQ==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "async": "2.6.4", + "chalk": "1.1.3", + "flaverr": "^1.8.0", + "parley": "^3.3.2", + "prompt": "1.2.1", + "sails-disk": "^2.0.0", + "waterline": "^0.15.0", + "waterline-utils": "^1.0.0" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + } + } + }, + "sails-hook-sockets": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/sails-hook-sockets/-/sails-hook-sockets-2.0.3.tgz", + "integrity": "sha512-FFrf9mQ/vOf9iR/nPSCO444zhzJMiQGhuCPXPd4LiuNR3+c4QXTaIA7mu0uYYkIcElESDhIcS2jDSC6Ze2b28w==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "async": "2.6.4", + "flaverr": "^1.0.0", + "machinepack-redis": "^2.0.3", + "machinepack-urls": "^6.0.2-0", + "proxy-addr": "1.1.5", + "semver": "4.3.6", + "socket.io": "2.5.0", + "uid2": "0.0.3" + }, + "dependencies": { + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha512-Ua9xNhH0b8pwE3yRbFfXJvfdWF0UHNCdeyb2sbi9Ul/M+r3PTdrz7Cv4SCfZRMjmzEM9PhraqfZFbGTIg3OMyA==" + }, + "ipaddr.js": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", + "integrity": "sha512-RbrsPoo4IkisyHhS9VDa3ybxnu0wOo0uTAhaELmwxq244p18X7Dk0fQoJvh/QTkIUO296fbjgvMqK3ry84eVVA==" + }, + "proxy-addr": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz", + "integrity": "sha512-av1MQ5vwTiMICwU75KSf/vJ6a+AXP0MtP+aYBqm2RFlire7BP6sWlfOLc8+6wIQrywycqSpJWm5zNkYFkRARWA==", + "requires": { + "forwarded": "~0.1.0", + "ipaddr.js": "1.4.0" + } + } + } + }, + "sails-stringfile": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/sails-stringfile/-/sails-stringfile-0.3.3.tgz", + "integrity": "sha512-m61lSEURCpKf2T7Df9lkG2eWBPGFKrhJZi8OF3TMQe7HGWyUpYdwKhV6rFsky1gY6g4ecvTZTAqwHXOE1AtaCA==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "colors": "*" + } + }, + "sails.io.js-dist": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sails.io.js-dist/-/sails.io.js-dist-1.2.1.tgz", + "integrity": "sha512-fBMdntawlqd5N/1xL9Vu6l+J5zvy86jLUf0nFDal5McUeZzUy7PpNqq+Vx/F9KgItAyFJ7RoO3YltO9dD0Q5OQ==" + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha512-IrpJ+yoG4EOH8DFWuVg+8H1kW1Oaof0Wxe7cPcXW3x9BjkN/eVo54F15LyqemnDIUYskQWr9qvl/RihmSy6+xQ==" + }, + "send": { + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", + "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "1.8.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "http-errors": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==" + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + } + } + }, + "serve-favicon": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.4.5.tgz", + "integrity": "sha512-s7F8h2NrslMkG50KxvlGdj+ApSwaLex0vexuJ9iFf3GLTIp1ph/l1qZvRe9T9TJEYZgmq72ZwJ2VYiAEtChknw==", + "requires": { + "etag": "~1.8.1", + "fresh": "0.5.2", + "ms": "2.0.0", + "parseurl": "~1.3.2", + "safe-buffer": "5.1.1" + } + }, + "serve-static": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz", + "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==", + "requires": { + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.1" + }, + "dependencies": { + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "dependencies": { + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==" + } + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "send": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz", + "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.1", + "destroy": "~1.0.4", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.3.1" + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + } + } + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "skipper": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/skipper/-/skipper-0.9.3.tgz", + "integrity": "sha512-BZvo0PLELUt3cJ5l5dmgsSkaH0n7dsyllTLX19rl414m+o8jJBXoHwunpFyp+TqIG2CwFiR6kE6/krR1/6xDLQ==", + "requires": { + "@sailshq/lodash": "^3.10.3", + "async": "2.6.4", + "body-parser": "1.19.2", + "debug": "3.1.0", + "multiparty": "4.1.3", + "semver": "4.3.6", + "skipper-disk": "~0.5.6", + "string_decoder": "0.10.31", + "uuid": "7.0.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "skipper-disk": { + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/skipper-disk/-/skipper-disk-0.5.12.tgz", + "integrity": "sha512-yyLOWT1WKY2h9NaUuG77XyhMti6vltRqp3ofN2ZTYoG3/V/SRLH1CjtZQ2Az6oqgMrfN8SZ83k3ptaOvB31YmQ==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "debug": "3.1.0", + "fs-extra": "0.30.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + } + } + }, + "socket.io": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.5.0.tgz", + "integrity": "sha512-gGunfS0od3VpwDBpGwVkzSZx6Aqo9uOcf1afJj2cKnKFAoyl16fvhpsUhmUFd4Ldbvl5JvRQed6eQw6oQp6n8w==", + "requires": { + "debug": "~4.1.0", + "engine.io": "~3.6.0", + "has-binary2": "~1.0.2", + "socket.io-adapter": "~1.1.0", + "socket.io-client": "2.5.0", + "socket.io-parser": "~3.4.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "socket.io-adapter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", + "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==" + }, + "socket.io-client": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.5.0.tgz", + "integrity": "sha512-lOO9clmdgssDykiOmVQQitwBAF3I6mYcQAo7hQ7AM6Ny5X7fp8hIJ3HcQs3Rjz4SoggoxA1OgrQyY8EgTbcPYw==", + "requires": { + "backo2": "1.0.2", + "component-bind": "1.0.0", + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "engine.io-client": "~3.5.0", + "has-binary2": "~1.0.2", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "socket.io-parser": "~3.3.0", + "to-array": "0.1.4" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==" + }, + "socket.io-parser": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.3.tgz", + "integrity": "sha512-qOg87q1PMWWTeO01768Yh9ogn7chB9zkKtQnya41Y355S0UmpXgpcrFwAgjYJxu9BdKug5r5e9YtVSeWhKBUZg==", + "requires": { + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "isarray": "2.0.1" + } + } + } + }, + "socket.io-parser": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.3.tgz", + "integrity": "sha512-1rE4dZN3kCI/E5wixd393hmbqa78vVpkKmnEJhLeWoS/C5hbFYAbcSfnWoaVH43u9ToUVtzKjguxEZq+1XZfCQ==", + "requires": { + "component-emitter": "1.2.1", + "debug": "~4.1.0", + "isarray": "2.0.1" + }, + "dependencies": { + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==" + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==" + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "sort-route-addresses": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/sort-route-addresses/-/sort-route-addresses-0.0.4.tgz", + "integrity": "sha512-8NPmJNHcPIQvUpGQ4zj9Jn3hsp0TpnH4LhX3+mZrZB73N3TqI/RBo9avazhnPdv8jFH1iTsCTzHXYBiYfuWVyg==", + "requires": { + "@sailshq/lodash": "^3.10.2" + } + }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==" + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha512-wuTCPGlJONk/a1kqZ4fQM2+908lC7fa7nPYpTC1EhnvqLX/IICbeP1OZGDtA374trpSq68YubKUMo8oRhN46yg==" + }, + "streamifier": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz", + "integrity": "sha512-zDgl+muIlWzXNsXeyUfOk9dChMjlpkq0DRsxujtYPgyJ676yQ8jEm6zzaaWHFDg5BNcLuif0eD2MTyJdZqXpdg==" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==" + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==" + }, + "switchback": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/switchback/-/switchback-2.0.5.tgz", + "integrity": "sha512-w9gnsTxR5geOKt45QUryhDP9KTLcOAqje9usR2VQ2ng8DfhaF+mkIcArxioMP/p6Z/ecKE58i2/B0DDlMJK1jw==", + "requires": { + "@sailshq/lodash": "^3.10.3" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==" + }, + "to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==" + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsscmp": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", + "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "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" + } + }, + "uid-safe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", + "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", + "requires": { + "random-bytes": "~1.0.0" + } + }, + "uid2": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz", + "integrity": "sha512-5gSP1liv10Gjp8cMEnFd6shzkL/D6W1uhXSFNCxDC+YI8+L8wkCYCbJ7n77Ezb4wE/xzMogecE+DtamEe9PZjg==" + }, + "underscore": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", + "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==" + }, + "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==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "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": "7.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.0.tgz", + "integrity": "sha512-LNUrNsXdI/fUsypJbWM8Jt4DgQdFAZh41p9C7WE9Cn+CULOEkoG2lgQyH68v3wnIy5K3fN4jdSt270K6IFA3MQ==" + }, + "validator": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", + "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha512-cF4je9Fgt6sj1PKfuFt9jpQPeHosM+Ryma/hfY9U7uXGKM7pJCsF0v2r55o+Il54+i77SyYWetB4tD1dEygRkw==", + "requires": { + "makeerror": "1.0.x" + } + }, + "waterline": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/waterline/-/waterline-0.15.2.tgz", + "integrity": "sha512-GCLabGXVh4d5l5uQEpozqsmG0PpPAxhe+kOertotTpvAI4S+Uspev+Q/tef1B7efAMUa8SMs4l5UheNpbe3zTA==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "anchor": "^1.2.0", + "async": "2.6.4", + "encrypted-attr": "1.0.6", + "flaverr": "^1.9.2", + "lodash.issafeinteger": "4.0.4", + "parley": "^3.3.2", + "rttc": "^10.0.0-1", + "waterline-schema": "^1.0.0-20", + "waterline-utils": "^1.3.7" + } + }, + "waterline-schema": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/waterline-schema/-/waterline-schema-1.0.0.tgz", + "integrity": "sha512-dSz/CvOLYMULKieB91+ZSv415+AVgrLhlSWbhpVHfpczIbKyj+zorsB5AG+ukGw1z0CPs6F1ib8MicBNjtwv6g==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "flaverr": "^1.8.1", + "rttc": "^10.0.0-1" + } + }, + "waterline-utils": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/waterline-utils/-/waterline-utils-1.4.5.tgz", + "integrity": "sha512-S2KAlfsDjh6WfAgEGHn2BSAhrytnUzXc0BdO2igLrVMhnnheWSWVsW+6koOxOruxaStWuSkCqS5H5H9pL2LCOg==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "async": "2.6.4", + "flaverr": "^1.1.1", + "fs-extra": "0.30.0", + "qs": "6.4.1" + }, + "dependencies": { + "qs": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.1.tgz", + "integrity": "sha512-LQy1Q1fcva/UsnP/6Iaa4lVeM49WiOitu2T4hZCyA/elLKu37L99qcBJk4VCCk+rdLvnMzfKyiN3SZTqdAZGSQ==" + } + } + }, + "whelk": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/whelk/-/whelk-6.0.1.tgz", + "integrity": "sha512-C6jGmpclsvSYm3rNhCkrdIdGhL9Oh6A9jnSmTN4lfEbH+ENQvjP9qZ5UV9WWolfoumpIzTBVupk1qiVeLL7yYQ==", + "requires": { + "@sailshq/lodash": "^3.10.2", + "chalk": "1.1.3", + "commander": "2.8.1", + "flaverr": "^1.7.0", + "machine": "^15.2.2", + "rttc": "^10.0.0-0", + "yargs": "3.4.5" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "commander": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "integrity": "sha512-+pJLBFVk+9ZZdlAOB5WuIElVPPth47hILFkmGym57aq8kwxsowvByvB0DHs1vQAhyMZzdcpTtF0VDKGkSDR4ZQ==", + "requires": { + "graceful-readlink": ">= 1.0.0" + } + } + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==" + }, + "winston": { + "version": "2.4.7", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.7.tgz", + "integrity": "sha512-vLB4BqzCKDnnZH9PHGoS2ycawueX4HLqENXQitvFHczhgW2vFpSOn31LZtVr1KU8YTw7DS4tM+cqyovxo8taVg==", + "requires": { + "async": "^2.6.4", + "colors": "1.0.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==" + } + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" + }, + "xmlhttprequest-ssl": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.3.tgz", + "integrity": "sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q==" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==" + }, + "yargs": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.4.5.tgz", + "integrity": "sha512-dzEdPellxHQAVtmfZqJXzboHlw23QKcqdubss08Mcj4JLHdfNYbLIT3nyfvRGT827d6eIFS9CsESCwWPDeCjCw==", + "requires": { + "camelcase": "^1.0.2", + "decamelize": "^1.0.0", + "window-size": "0.1.0", + "wordwrap": "0.0.2" + } + }, + "yeast": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==" + } + } +} diff --git a/src/server/package.json b/src/server/package.json new file mode 100644 index 0000000..d92f098 --- /dev/null +++ b/src/server/package.json @@ -0,0 +1,32 @@ +{ + "name": "server", + "private": true, + "version": "0.0.0", + "description": "a Sails application", + "keywords": [], + "dependencies": { + "sails": "^1.5.4", + "sails-hook-orm": "^4.0.0", + "sails-hook-sockets": "^2.0.0", + "@sailshq/lodash": "^3.10.3" + }, + "devDependencies": { + "eslint": "5.16.0" + }, + "scripts": { + "start": "NODE_ENV=production node app.js", + "test": "npm run lint && npm run custom-tests && echo 'Done.'", + "lint": "./node_modules/eslint/bin/eslint.js . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your .js files look good.'", + "custom-tests": "echo \"(No other custom tests yet.)\" && echo" + }, + "main": "app.js", + "repository": { + "type": "git", + "url": "git://github.com/priyanshu/server.git" + }, + "author": "priyanshu", + "license": "", + "engines": { + "node": "^14.21" + } +} From ce75f4cf679b72f014420121cec8935e1e5ac66e Mon Sep 17 00:00:00 2001 From: priyanshu-kun Date: Thu, 15 Jun 2023 18:57:52 +0530 Subject: [PATCH 05/11] start implementating crawling controller - create fasade design pattern for crawling. --- .vscode/settings.json | 4 + src/server/api/Fasades/CrawlerFasade.js | 11 + src/server/api/constants/constants.js | 4 + src/server/api/drivers/CommonCrawlDriver.js | 30 ++ .../api/drivers/GoogleBigQueryDriver.js | 8 + src/server/api/scheduledTasks/scheduler.js | 34 +++ src/server/api/services/CrawlerService.js | 18 ++ src/server/config/bootstrap.js | 3 + src/server/package-lock.json | 256 ++++++++++++++++++ src/server/package.json | 10 +- 10 files changed, 374 insertions(+), 4 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 src/server/api/Fasades/CrawlerFasade.js create mode 100644 src/server/api/constants/constants.js create mode 100644 src/server/api/drivers/CommonCrawlDriver.js create mode 100644 src/server/api/drivers/GoogleBigQueryDriver.js create mode 100644 src/server/api/scheduledTasks/scheduler.js create mode 100644 src/server/api/services/CrawlerService.js diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e95c2d5 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "prettier.jsxSingleQuote": true, + "prettier.singleQuote": true +} \ No newline at end of file diff --git a/src/server/api/Fasades/CrawlerFasade.js b/src/server/api/Fasades/CrawlerFasade.js new file mode 100644 index 0000000..bf76b37 --- /dev/null +++ b/src/server/api/Fasades/CrawlerFasade.js @@ -0,0 +1,11 @@ +class DataSourceFacade { + constructor(dataSource) { + this.dataSource = dataSource; + } + + async crawlData() { + return await this.dataSource.crawlData(); + } +} + +module.exports = DataSourceFacade; diff --git a/src/server/api/constants/constants.js b/src/server/api/constants/constants.js new file mode 100644 index 0000000..1701d9c --- /dev/null +++ b/src/server/api/constants/constants.js @@ -0,0 +1,4 @@ +const URL = 'https://index.commoncrawl.org/'; + + +module.exports = {URL}; diff --git a/src/server/api/drivers/CommonCrawlDriver.js b/src/server/api/drivers/CommonCrawlDriver.js new file mode 100644 index 0000000..317202e --- /dev/null +++ b/src/server/api/drivers/CommonCrawlDriver.js @@ -0,0 +1,30 @@ +const { URL } = require('../constants/constants'); +class CommonCrawlDriver { + // async getDataFromCommomCrawlServer(url) { + // try { + // const links = []; + // const { data } = await axios.get(url); + // const html = data; + // const $ = await cheerio.load(html); + // $('tbody tr').each((index, row) => { + // const linkTd = $(row).find('td:last-child'); + // const link = linkTd.find('a').attr('href'); + // links.push(link); + // }); + // return links; + // } catch (e) { + // // handle errors gracefully + // console.log(e); + // } + // } + async crawlData() { + try { + console.log('Crawl for common crawl dataset...'); + // const data = await getDataFromCommomCrawlServer(URL); + } catch (error) { + console.error(error); + } + } +} + +module.exports = CommonCrawlDriver; diff --git a/src/server/api/drivers/GoogleBigQueryDriver.js b/src/server/api/drivers/GoogleBigQueryDriver.js new file mode 100644 index 0000000..6c3d2c9 --- /dev/null +++ b/src/server/api/drivers/GoogleBigQueryDriver.js @@ -0,0 +1,8 @@ +class GoogleBigQueryDriver { + async crawlData() { + console.log('Crawl for Big query dataset...'); + } +} + +module.exports = GoogleBigQueryDriver; + diff --git a/src/server/api/scheduledTasks/scheduler.js b/src/server/api/scheduledTasks/scheduler.js new file mode 100644 index 0000000..1b2be2f --- /dev/null +++ b/src/server/api/scheduledTasks/scheduler.js @@ -0,0 +1,34 @@ +const cron = require('node-cron'); +const CrawlerFasade = require('../Fasades/CrawlerFasade'); +const CommonCrawlDriver = require('../drivers/CommonCrawlDriver'); +const GoogleBigQueryDriver = require('../drivers/GoogleBigQueryDriver'); + +const commonCrawlDriver = new CommonCrawlDriver(); +const commonCrawlFasade = new CrawlerFasade(commonCrawlDriver); +const googleBigQueryDriver = new GoogleBigQueryDriver(); +const googleBigQueryCrawlFasade = new CrawlerFasade(googleBigQueryDriver); +const { crawlCommonCrawlDataset, crawlGoogleBigQueryDataset } = require('../services/CrawlerService'); + +class DatasetCrawler { + constructor() { + this.schedule = '0 0 * * 0'; // Execute once in a week. + } + + async start() { + const commonCrawlIndexData = await crawlCommonCrawlDataset(commonCrawlFasade); + console.log(commonCrawlIndexData); + + // const googleBigQueryIndexData = await crawlGoogleBigQueryDataset(); + // console.log(googleBigQueryIndexData); + + // cron.schedule(this.schedule, () => { + // this.crawlDatasets(); + // }); + } + + // crawlDatasets() { + // console.log('Crawling datasets...'); + // } +} + +module.exports = new DatasetCrawler(); diff --git a/src/server/api/services/CrawlerService.js b/src/server/api/services/CrawlerService.js new file mode 100644 index 0000000..80740f1 --- /dev/null +++ b/src/server/api/services/CrawlerService.js @@ -0,0 +1,18 @@ +async function crawlDataset(crawlFacade) { + try { + return await crawlFacade.crawlData(); + } catch (error) { + console.error('ERROR:', error); + } +} + +module.exports = { + async crawlCommonCrawlDataset(commonCrawlFacade) { + const data = await crawlDataset(commonCrawlFacade); + return null; + }, + async crawlGoogleBigQueryDataset(googleBigQueryCrawlFacade) { + const data = await crawlDataset(googleBigQueryCrawlFacade); + return null; + } +}; diff --git a/src/server/config/bootstrap.js b/src/server/config/bootstrap.js index fb1c17f..4ab2862 100644 --- a/src/server/config/bootstrap.js +++ b/src/server/config/bootstrap.js @@ -1,3 +1,4 @@ +const datasetCrawler = require('../api/scheduledTasks/scheduler'); /** * Seed Function * (sails.config.bootstrap) @@ -11,6 +12,8 @@ module.exports.bootstrap = async function() { + datasetCrawler.start(); + // By convention, this is a good place to set up fake data during development. // // For example: diff --git a/src/server/package-lock.json b/src/server/package-lock.json index 73d8ade..f4fad78 100644 --- a/src/server/package-lock.json +++ b/src/server/package-lock.json @@ -62,6 +62,12 @@ } } }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -125,6 +131,16 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==" }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -191,6 +207,12 @@ "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==" }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, "blob": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", @@ -260,6 +282,15 @@ "balanced-match": "^1.0.0" } }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -340,6 +371,22 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -1099,6 +1146,15 @@ } } }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, "finalhandler": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.6.tgz", @@ -1190,6 +1246,13 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -1209,6 +1272,15 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -1315,6 +1387,12 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -1458,12 +1536,42 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", "dev": true }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", @@ -1821,6 +1929,92 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "node-cron": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-3.0.2.tgz", + "integrity": "sha512-iP8l0yGlNpE0e6q1o185yOApANRe47UPbLf4YxfbiNHt/RU5eBcGB/e0oudruheSf+LQeDMezqC5BVAb5wwRcQ==", + "requires": { + "uuid": "8.3.2" + }, + "dependencies": { + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, + "nodemon": { + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", + "dev": true, + "requires": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -1948,6 +2142,12 @@ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, "pluralize": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", @@ -2006,6 +2206,12 @@ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==" }, + "pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, "punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -2091,6 +2297,15 @@ "mute-stream": "~0.0.4" } }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, "redis": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/redis/-/redis-3.1.1.tgz", @@ -2587,6 +2802,23 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, + "simple-update-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", + "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", + "dev": true, + "requires": { + "semver": "~7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, "skipper": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/skipper/-/skipper-0.9.3.tgz", @@ -2923,11 +3155,29 @@ "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", "integrity": "sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==" }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, + "touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "requires": { + "nopt": "~1.0.10" + } + }, "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -2970,6 +3220,12 @@ "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz", "integrity": "sha512-5gSP1liv10Gjp8cMEnFd6shzkL/D6W1uhXSFNCxDC+YI8+L8wkCYCbJ7n77Ezb4wE/xzMogecE+DtamEe9PZjg==" }, + "undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, "underscore": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", diff --git a/src/server/package.json b/src/server/package.json index d92f098..651a4d3 100644 --- a/src/server/package.json +++ b/src/server/package.json @@ -5,19 +5,21 @@ "description": "a Sails application", "keywords": [], "dependencies": { + "@sailshq/lodash": "^3.10.3", + "node-cron": "^3.0.2", "sails": "^1.5.4", "sails-hook-orm": "^4.0.0", - "sails-hook-sockets": "^2.0.0", - "@sailshq/lodash": "^3.10.3" + "sails-hook-sockets": "^2.0.0" }, "devDependencies": { - "eslint": "5.16.0" + "eslint": "5.16.0", + "nodemon": "^2.0.22" }, "scripts": { "start": "NODE_ENV=production node app.js", "test": "npm run lint && npm run custom-tests && echo 'Done.'", "lint": "./node_modules/eslint/bin/eslint.js . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your .js files look good.'", - "custom-tests": "echo \"(No other custom tests yet.)\" && echo" + "dev": "nodemon app.js" }, "main": "app.js", "repository": { From 47a02ded106f9fa64e0b807fe46896989d7a0f0e Mon Sep 17 00:00:00 2001 From: priyanshu-kun Date: Thu, 15 Jun 2023 21:00:27 +0530 Subject: [PATCH 06/11] Fix the typo in whole codebase: Fasade to Facade --- .../CrawlerFasade.js => Facades/CrawlerFacade.js} | 0 src/server/api/scheduledTasks/scheduler.js | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/server/api/{Fasades/CrawlerFasade.js => Facades/CrawlerFacade.js} (100%) diff --git a/src/server/api/Fasades/CrawlerFasade.js b/src/server/api/Facades/CrawlerFacade.js similarity index 100% rename from src/server/api/Fasades/CrawlerFasade.js rename to src/server/api/Facades/CrawlerFacade.js diff --git a/src/server/api/scheduledTasks/scheduler.js b/src/server/api/scheduledTasks/scheduler.js index 1b2be2f..d20d2b2 100644 --- a/src/server/api/scheduledTasks/scheduler.js +++ b/src/server/api/scheduledTasks/scheduler.js @@ -1,12 +1,12 @@ const cron = require('node-cron'); -const CrawlerFasade = require('../Fasades/CrawlerFasade'); +const CrawlerFacade = require('../Facades/CrawlerFacade'); const CommonCrawlDriver = require('../drivers/CommonCrawlDriver'); const GoogleBigQueryDriver = require('../drivers/GoogleBigQueryDriver'); const commonCrawlDriver = new CommonCrawlDriver(); -const commonCrawlFasade = new CrawlerFasade(commonCrawlDriver); +const commonCrawlFacade = new CrawlerFacade(commonCrawlDriver); const googleBigQueryDriver = new GoogleBigQueryDriver(); -const googleBigQueryCrawlFasade = new CrawlerFasade(googleBigQueryDriver); +const googleBigQueryCrawlFacade = new CrawlerFacade(googleBigQueryDriver); const { crawlCommonCrawlDataset, crawlGoogleBigQueryDataset } = require('../services/CrawlerService'); class DatasetCrawler { @@ -15,7 +15,7 @@ class DatasetCrawler { } async start() { - const commonCrawlIndexData = await crawlCommonCrawlDataset(commonCrawlFasade); + const commonCrawlIndexData = await crawlCommonCrawlDataset(commonCrawlFacade); console.log(commonCrawlIndexData); // const googleBigQueryIndexData = await crawlGoogleBigQueryDataset(); From 3484876fa3d64eac046cb9edbddc788de1e7ca4a Mon Sep 17 00:00:00 2001 From: priyanshu-kun Date: Tue, 20 Jun 2023 16:53:06 +0530 Subject: [PATCH 07/11] Reorganize the directory structure through refactoring and rewrite the crawling process. Implement a crawling controller and create the Common Crawl driver. --- src/server/api/Facades/CrawlerFacade.js | 11 -- src/server/api/constants/constants.js | 6 +- .../api/controllers/CrawlingController.js | 13 ++ src/server/api/drivers/CommonCrawlDriver.js | 30 --- .../api/drivers/GoogleBigQueryDriver.js | 8 - src/server/api/drivers/common-crawl-driver.js | 44 +++++ .../api/drivers/google-big-query-driver.js | 8 + src/server/api/keywords.json | 3 + src/server/api/scheduledTasks/scheduler.js | 34 ---- src/server/api/services/CrawlerService.js | 18 -- src/server/api/services/download-service.js | 26 +++ src/server/api/services/parse-service.js | 0 src/server/api/services/validate-service.js | 0 .../api/utils/common-crawl-driver-util.js | 45 +++++ src/server/api/utils/process-batch.js | 14 ++ src/server/config/bootstrap.js | 3 - src/server/config/routes.js | 1 + src/server/package-lock.json | 176 ++++++++++++++++++ src/server/package.json | 5 +- 19 files changed, 338 insertions(+), 107 deletions(-) delete mode 100644 src/server/api/Facades/CrawlerFacade.js create mode 100644 src/server/api/controllers/CrawlingController.js delete mode 100644 src/server/api/drivers/CommonCrawlDriver.js delete mode 100644 src/server/api/drivers/GoogleBigQueryDriver.js create mode 100644 src/server/api/drivers/common-crawl-driver.js create mode 100644 src/server/api/drivers/google-big-query-driver.js create mode 100644 src/server/api/keywords.json delete mode 100644 src/server/api/scheduledTasks/scheduler.js delete mode 100644 src/server/api/services/CrawlerService.js create mode 100644 src/server/api/services/download-service.js create mode 100644 src/server/api/services/parse-service.js create mode 100644 src/server/api/services/validate-service.js create mode 100644 src/server/api/utils/common-crawl-driver-util.js create mode 100644 src/server/api/utils/process-batch.js diff --git a/src/server/api/Facades/CrawlerFacade.js b/src/server/api/Facades/CrawlerFacade.js deleted file mode 100644 index bf76b37..0000000 --- a/src/server/api/Facades/CrawlerFacade.js +++ /dev/null @@ -1,11 +0,0 @@ -class DataSourceFacade { - constructor(dataSource) { - this.dataSource = dataSource; - } - - async crawlData() { - return await this.dataSource.crawlData(); - } -} - -module.exports = DataSourceFacade; diff --git a/src/server/api/constants/constants.js b/src/server/api/constants/constants.js index 1701d9c..d00560e 100644 --- a/src/server/api/constants/constants.js +++ b/src/server/api/constants/constants.js @@ -1,4 +1,6 @@ const URL = 'https://index.commoncrawl.org/'; +const SCHEDULE = '0 0 * * 0'; +const INDEX_FILES_BATCH_SIZE = 10; +const DELAY = 1000; // 1 second delay - -module.exports = {URL}; +module.exports = {URL,SCHEDULE,INDEX_FILES_BATCH_SIZE,DELAY}; diff --git a/src/server/api/controllers/CrawlingController.js b/src/server/api/controllers/CrawlingController.js new file mode 100644 index 0000000..2064de5 --- /dev/null +++ b/src/server/api/controllers/CrawlingController.js @@ -0,0 +1,13 @@ +const {retrieveDefinations} = require('../drivers/common-crawl-driver'); +// const GoogleBigQueryDriver = require('../drivers/google-big-query-driver'); + +module.exports = { + 'start-crawling': async function (req, res) { + try { + const validatableResults = await retrieveDefinations(); + res.ok('OK'); + } catch (error) { + console.error(error); + } + }, +}; diff --git a/src/server/api/drivers/CommonCrawlDriver.js b/src/server/api/drivers/CommonCrawlDriver.js deleted file mode 100644 index 317202e..0000000 --- a/src/server/api/drivers/CommonCrawlDriver.js +++ /dev/null @@ -1,30 +0,0 @@ -const { URL } = require('../constants/constants'); -class CommonCrawlDriver { - // async getDataFromCommomCrawlServer(url) { - // try { - // const links = []; - // const { data } = await axios.get(url); - // const html = data; - // const $ = await cheerio.load(html); - // $('tbody tr').each((index, row) => { - // const linkTd = $(row).find('td:last-child'); - // const link = linkTd.find('a').attr('href'); - // links.push(link); - // }); - // return links; - // } catch (e) { - // // handle errors gracefully - // console.log(e); - // } - // } - async crawlData() { - try { - console.log('Crawl for common crawl dataset...'); - // const data = await getDataFromCommomCrawlServer(URL); - } catch (error) { - console.error(error); - } - } -} - -module.exports = CommonCrawlDriver; diff --git a/src/server/api/drivers/GoogleBigQueryDriver.js b/src/server/api/drivers/GoogleBigQueryDriver.js deleted file mode 100644 index 6c3d2c9..0000000 --- a/src/server/api/drivers/GoogleBigQueryDriver.js +++ /dev/null @@ -1,8 +0,0 @@ -class GoogleBigQueryDriver { - async crawlData() { - console.log('Crawl for Big query dataset...'); - } -} - -module.exports = GoogleBigQueryDriver; - diff --git a/src/server/api/drivers/common-crawl-driver.js b/src/server/api/drivers/common-crawl-driver.js new file mode 100644 index 0000000..f2a194d --- /dev/null +++ b/src/server/api/drivers/common-crawl-driver.js @@ -0,0 +1,44 @@ +const { + URL, + INDEX_FILES_BATCH_SIZE, + DELAY, +} = require('../constants/constants'); +const { + retrieveIndexUrlsFromCCServer +} = require('../utils/common-crawl-driver-util'); +const {processBatch} = require('../utils/process-batch'); +const ccFilesPromises = []; + +module.exports = { + retrieveDefinations: async function () { + try { + const crawledFiles = await retrieveIndexUrlsFromCCServer(URL); + + + // Implement a batch processing mechanism to retrieve URLs of index files + // from directories obtained by scraping the Common Crawl server. + for (let i = 0; i < crawledFiles.length; i += INDEX_FILES_BATCH_SIZE) { + const remainingFiles = crawledFiles.length - i; + const batch = crawledFiles.slice( + i, + i + Math.min(INDEX_FILES_BATCH_SIZE, remainingFiles) + ); + const batchPromise = processBatch(batch); + + ccFilesPromises.push(batchPromise); + + if (i + INDEX_FILES_BATCH_SIZE < crawledFiles.length) { + await new Promise((resolve) => setTimeout(resolve, DELAY)); + } + } + + + + const ccFilesResults = await Promise.all(ccFilesPromises); + const flattedResult = ccFilesResults.flat(); + console.log('Flatten results: ',flattedResult); + } catch (error) { + console.error(error); + } + }, +}; diff --git a/src/server/api/drivers/google-big-query-driver.js b/src/server/api/drivers/google-big-query-driver.js new file mode 100644 index 0000000..5a24ed7 --- /dev/null +++ b/src/server/api/drivers/google-big-query-driver.js @@ -0,0 +1,8 @@ +module.exports = { + async googleBigQueryCrawler() { + console.log('Crawl for Big query dataset...'); + } +} + +module.exports = GoogleBigQueryDriver; + diff --git a/src/server/api/keywords.json b/src/server/api/keywords.json new file mode 100644 index 0000000..077404a --- /dev/null +++ b/src/server/api/keywords.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/src/server/api/scheduledTasks/scheduler.js b/src/server/api/scheduledTasks/scheduler.js deleted file mode 100644 index d20d2b2..0000000 --- a/src/server/api/scheduledTasks/scheduler.js +++ /dev/null @@ -1,34 +0,0 @@ -const cron = require('node-cron'); -const CrawlerFacade = require('../Facades/CrawlerFacade'); -const CommonCrawlDriver = require('../drivers/CommonCrawlDriver'); -const GoogleBigQueryDriver = require('../drivers/GoogleBigQueryDriver'); - -const commonCrawlDriver = new CommonCrawlDriver(); -const commonCrawlFacade = new CrawlerFacade(commonCrawlDriver); -const googleBigQueryDriver = new GoogleBigQueryDriver(); -const googleBigQueryCrawlFacade = new CrawlerFacade(googleBigQueryDriver); -const { crawlCommonCrawlDataset, crawlGoogleBigQueryDataset } = require('../services/CrawlerService'); - -class DatasetCrawler { - constructor() { - this.schedule = '0 0 * * 0'; // Execute once in a week. - } - - async start() { - const commonCrawlIndexData = await crawlCommonCrawlDataset(commonCrawlFacade); - console.log(commonCrawlIndexData); - - // const googleBigQueryIndexData = await crawlGoogleBigQueryDataset(); - // console.log(googleBigQueryIndexData); - - // cron.schedule(this.schedule, () => { - // this.crawlDatasets(); - // }); - } - - // crawlDatasets() { - // console.log('Crawling datasets...'); - // } -} - -module.exports = new DatasetCrawler(); diff --git a/src/server/api/services/CrawlerService.js b/src/server/api/services/CrawlerService.js deleted file mode 100644 index 80740f1..0000000 --- a/src/server/api/services/CrawlerService.js +++ /dev/null @@ -1,18 +0,0 @@ -async function crawlDataset(crawlFacade) { - try { - return await crawlFacade.crawlData(); - } catch (error) { - console.error('ERROR:', error); - } -} - -module.exports = { - async crawlCommonCrawlDataset(commonCrawlFacade) { - const data = await crawlDataset(commonCrawlFacade); - return null; - }, - async crawlGoogleBigQueryDataset(googleBigQueryCrawlFacade) { - const data = await crawlDataset(googleBigQueryCrawlFacade); - return null; - } -}; diff --git a/src/server/api/services/download-service.js b/src/server/api/services/download-service.js new file mode 100644 index 0000000..2528e0f --- /dev/null +++ b/src/server/api/services/download-service.js @@ -0,0 +1,26 @@ +const axios = require('axios'); +module.exports = { + downloadFile: async function (url) { + try { + return await axios({ + url, + method: 'GET', + responseType: 'stream', + onDownloadProgress: function (progressEvent) { + const total = progressEvent.total; + const downloaded = progressEvent.loaded; + + const percent = Math.round((downloaded / total) * 100); + + process.stdout.clearLine(); + process.stdout.cursorTo(0); + process.stdout.write( + `Downloading: ${percent}% (${downloaded}/${total} bytes)` + ); + }, + }); + } catch (error) { + console.error(error); + } + }, +}; diff --git a/src/server/api/services/parse-service.js b/src/server/api/services/parse-service.js new file mode 100644 index 0000000..e69de29 diff --git a/src/server/api/services/validate-service.js b/src/server/api/services/validate-service.js new file mode 100644 index 0000000..e69de29 diff --git a/src/server/api/utils/common-crawl-driver-util.js b/src/server/api/utils/common-crawl-driver-util.js new file mode 100644 index 0000000..3bf5b74 --- /dev/null +++ b/src/server/api/utils/common-crawl-driver-util.js @@ -0,0 +1,45 @@ +const axios = require('axios'); +const cheerio = require('cheerio'); +const readline = require('readline'); +const zlib = require('zlib'); +const { downloadFile } = require('../services/download-service'); + +module.exports = { + retrieveUrlsForIndexFiles: async function (url) { + try { + const response = await downloadFile(url); + const gunzip = zlib.createGunzip(); + const lines = readline.createInterface({ input: response.data.pipe(gunzip) }); + + const links = []; + + for await (const line of lines) { + const regex = /\.gz$/; + if (!regex.test(line)) { + continue; + } + links.push(`https://data.commoncrawl.org/${line}`); + } + + return links; + } catch (error) { + console.error(error.message); + } + }, + retrieveIndexUrlsFromCCServer: async function (url) { + try { + const links = []; + const { data } = await axios.get(url); + const html = data; + const $ = await cheerio.load(html); + $('tbody tr').each((index, row) => { + const linkTd = $(row).find('td:last-child'); + const link = linkTd.find('a').attr('href'); + links.push(link); + }); + return links; + } catch (error) { + console.log(error); + } + } +}; diff --git a/src/server/api/utils/process-batch.js b/src/server/api/utils/process-batch.js new file mode 100644 index 0000000..947a183 --- /dev/null +++ b/src/server/api/utils/process-batch.js @@ -0,0 +1,14 @@ +const { + retrieveUrlsForIndexFiles, +} = require('./common-crawl-driver-util'); +module.exports = { + processBatch: async function (batch) { + const batchPromises = batch.map(async (r) => { + const urls = await retrieveUrlsForIndexFiles(r); + return urls; + }); + + const batchResults = await Promise.all(batchPromises); + return batchResults; + }, +}; diff --git a/src/server/config/bootstrap.js b/src/server/config/bootstrap.js index 4ab2862..fb1c17f 100644 --- a/src/server/config/bootstrap.js +++ b/src/server/config/bootstrap.js @@ -1,4 +1,3 @@ -const datasetCrawler = require('../api/scheduledTasks/scheduler'); /** * Seed Function * (sails.config.bootstrap) @@ -12,8 +11,6 @@ const datasetCrawler = require('../api/scheduledTasks/scheduler'); module.exports.bootstrap = async function() { - datasetCrawler.start(); - // By convention, this is a good place to set up fake data during development. // // For example: diff --git a/src/server/config/routes.js b/src/server/config/routes.js index ec74901..abd3c63 100644 --- a/src/server/config/routes.js +++ b/src/server/config/routes.js @@ -10,5 +10,6 @@ module.exports.routes = { + '/api/v1/run/crawler': 'CrawlingController.start-crawling' }; diff --git a/src/server/package-lock.json b/src/server/package-lock.json index f4fad78..38b7b92 100644 --- a/src/server/package-lock.json +++ b/src/server/package-lock.json @@ -187,6 +187,21 @@ "lodash": "^4.17.14" } }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "axios": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", + "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "requires": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", @@ -274,6 +289,11 @@ } } }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" + }, "brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -371,6 +391,33 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, + "cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "requires": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + } + }, + "cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "requires": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + } + }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -420,6 +467,14 @@ "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" }, + "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" + } + }, "commander": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", @@ -553,6 +608,23 @@ "uid-safe": "2.1.5" } }, + "css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "requires": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + } + }, + "css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==" + }, "csurf": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/csurf/-/csurf-1.10.0.tgz", @@ -605,6 +677,11 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, "denque": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", @@ -629,6 +706,39 @@ "esutils": "^2.0.2" } }, + "dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "requires": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + } + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" + }, + "domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "requires": { + "domelementtype": "^2.3.0" + } + }, + "domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "requires": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -734,6 +844,11 @@ "has-binary2": "~1.0.2" } }, + "entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -1219,6 +1334,21 @@ "@sailshq/lodash": "^3.10.2" } }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -1330,6 +1460,17 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", "integrity": "sha512-P+1n3MnwjR/Epg9BBo1KT8qbye2g2Ou4sFumihwt6I4tsUX7jnLcX4BTOSKg/B1ZrIYMN9FcEnG4x5a7NB8Eng==" }, + "htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "requires": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" + } + }, "http-errors": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", @@ -2015,6 +2156,14 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "requires": { + "boolbase": "^1.0.0" + } + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -2097,6 +2246,23 @@ "flaverr": "^1.5.1" } }, + "parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "requires": { + "entities": "^4.4.0" + } + }, + "parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "requires": { + "domhandler": "^5.0.2", + "parse5": "^7.0.0" + } + }, "parseqs": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", @@ -2201,6 +2367,11 @@ "ipaddr.js": "1.9.1" } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -3443,6 +3614,11 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", "integrity": "sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==" + }, + "zlib": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zlib/-/zlib-1.0.5.tgz", + "integrity": "sha512-40fpE2II+Cd3k8HWTWONfeKE2jL+P42iWJ1zzps5W51qcTsOUKM5Q5m2PFb0CLxlmFAaUuUdJGc3OfZy947v0w==" } } } diff --git a/src/server/package.json b/src/server/package.json index 651a4d3..e690f03 100644 --- a/src/server/package.json +++ b/src/server/package.json @@ -6,10 +6,13 @@ "keywords": [], "dependencies": { "@sailshq/lodash": "^3.10.3", + "axios": "^1.4.0", + "cheerio": "^1.0.0-rc.12", "node-cron": "^3.0.2", "sails": "^1.5.4", "sails-hook-orm": "^4.0.0", - "sails-hook-sockets": "^2.0.0" + "sails-hook-sockets": "^2.0.0", + "zlib": "^1.0.5" }, "devDependencies": { "eslint": "5.16.0", From c48cd219b9d73f4e12a6eb388c745509a689796d Mon Sep 17 00:00:00 2001 From: priyanshu-kun Date: Thu, 22 Jun 2023 16:11:12 +0530 Subject: [PATCH 08/11] write batch processing for common crawl directories and implement a delay while fetching directories from cc server. --- src/server/api/constants/Constants.js | 6 +++ src/server/api/constants/constants.js | 6 --- .../api/controllers/CrawlingController.js | 32 +++++++++++--- src/server/api/drivers/CommonCrawlDriver.js | 40 +++++++++++++++++ src/server/api/drivers/GithubCrawlerDriver.js | 5 +++ .../api/drivers/GoogleBigQueryDriver.js | 5 +++ src/server/api/drivers/common-crawl-driver.js | 44 ------------------- .../api/drivers/google-big-query-driver.js | 8 ---- ...download-service.js => DownloadService.js} | 6 +++ .../{parse-service.js => ParseService.js} | 0 ...validate-service.js => ValidateService.js} | 0 ...river-util.js => CommonCrawlDriverUtil.js} | 17 ++++--- src/server/api/utils/FlattenCCFilesResults.js | 5 +++ src/server/api/utils/ProcessBatch.js | 19 ++++++++ .../api/utils/ProcessDirectoriesInBatches.js | 34 ++++++++++++++ src/server/api/utils/SelectDataSources.js | 21 +++++++++ src/server/api/utils/process-batch.js | 14 ------ src/server/config/routes.js | 11 ++++- 18 files changed, 190 insertions(+), 83 deletions(-) create mode 100644 src/server/api/constants/Constants.js delete mode 100644 src/server/api/constants/constants.js create mode 100644 src/server/api/drivers/CommonCrawlDriver.js create mode 100644 src/server/api/drivers/GithubCrawlerDriver.js create mode 100644 src/server/api/drivers/GoogleBigQueryDriver.js delete mode 100644 src/server/api/drivers/common-crawl-driver.js delete mode 100644 src/server/api/drivers/google-big-query-driver.js rename src/server/api/services/{download-service.js => DownloadService.js} (66%) rename src/server/api/services/{parse-service.js => ParseService.js} (100%) rename src/server/api/services/{validate-service.js => ValidateService.js} (100%) rename src/server/api/utils/{common-crawl-driver-util.js => CommonCrawlDriverUtil.js} (67%) create mode 100644 src/server/api/utils/FlattenCCFilesResults.js create mode 100644 src/server/api/utils/ProcessBatch.js create mode 100644 src/server/api/utils/ProcessDirectoriesInBatches.js create mode 100644 src/server/api/utils/SelectDataSources.js delete mode 100644 src/server/api/utils/process-batch.js diff --git a/src/server/api/constants/Constants.js b/src/server/api/constants/Constants.js new file mode 100644 index 0000000..41272bd --- /dev/null +++ b/src/server/api/constants/Constants.js @@ -0,0 +1,6 @@ +const URL = 'https://index.commoncrawl.org/'; +const SCHEDULE = '0 0 * * 0'; +const DIRECTORIES_BATCH_SIZE = 10; +const DELAY = 1000; + +module.exports = {URL,SCHEDULE,DIRECTORIES_BATCH_SIZE,DELAY}; diff --git a/src/server/api/constants/constants.js b/src/server/api/constants/constants.js deleted file mode 100644 index d00560e..0000000 --- a/src/server/api/constants/constants.js +++ /dev/null @@ -1,6 +0,0 @@ -const URL = 'https://index.commoncrawl.org/'; -const SCHEDULE = '0 0 * * 0'; -const INDEX_FILES_BATCH_SIZE = 10; -const DELAY = 1000; // 1 second delay - -module.exports = {URL,SCHEDULE,INDEX_FILES_BATCH_SIZE,DELAY}; diff --git a/src/server/api/controllers/CrawlingController.js b/src/server/api/controllers/CrawlingController.js index 2064de5..0a46c9e 100644 --- a/src/server/api/controllers/CrawlingController.js +++ b/src/server/api/controllers/CrawlingController.js @@ -1,13 +1,35 @@ -const {retrieveDefinations} = require('../drivers/common-crawl-driver'); -// const GoogleBigQueryDriver = require('../drivers/google-big-query-driver'); +const { selectDataSources } = require('../utils/SelectDataSources'); module.exports = { + /** + * Controller for the 'start-crawling' route. Initiates the crawling process based on the provided data source. + * Retrieves API definitions from the selected data source and sends the response accordingly. + * @param {Object} req - The request object containing the data source and data fetching flag in the body. + * @param {Object} res - The response object to send the result back to the client. + * @returns {Object} - The response containing the retrieved API definitions or appropriate error messages. + * + * note: The dataFetchingFlag is a boolean flag used to determine the data year selection behavior. + * If the flag is set to false, the controller fetches only the latest year's data. + * If the flag is set to true, the controller fetches data from the latest year (2023) down to the year 2009. + * @typedef {boolean} dataFetchingFlag + */ 'start-crawling': async function (req, res) { try { - const validatableResults = await retrieveDefinations(); - res.ok('OK'); + const { dataSource } = req.body; + const { dataFetchingFlag } = req.body; + if (!dataSource) { + return res.badRequest('Data source not provided'); + } + let apiDefinitions = await selectDataSources( + dataSource, + dataFetchingFlag + ); + if (!apiDefinitions || apiDefinitions.length === 0) { + return res.notFound('No API definitions found'); + } + return res.json(apiDefinitions); } catch (error) { - console.error(error); + return res.serverError(error); } }, }; diff --git a/src/server/api/drivers/CommonCrawlDriver.js b/src/server/api/drivers/CommonCrawlDriver.js new file mode 100644 index 0000000..b578de8 --- /dev/null +++ b/src/server/api/drivers/CommonCrawlDriver.js @@ -0,0 +1,40 @@ +const { + URL, + DIRECTORIES_BATCH_SIZE, + DELAY, +} = require('../constants/Constants'); +const { + retrieveUrlsDirectoriesFromCCServer, +} = require('../utils/CommonCrawlDriverUtil'); +const { flattenCCFilesResults } = require('../utils/FlattenCCFilesResults'); +const { processDirectoriesInBatches } = require('../utils/ProcessDirectoriesInBatches'); + +module.exports = { + retrieveDefinitionsFromCC: async function (dataFetchingFlag) { + try { + const crawledDirectories = await retrieveUrlsDirectoriesFromCCServer( + URL, + dataFetchingFlag + ); + /** + * Implement a batch processing mechanism to retrieve URLs for index files + * from directories obtained by scraping the Common Crawl server. + * Process the crawled directories in batches, adding them to the ccFilesPromises array for asynchronous processing. + * Each batch contains a subset of directories from the crawledDirectories array. + * If there are remaining directories after processing a batch, a delay is introduced before processing the next batch. + */ + const ccFilesResults = await processDirectoriesInBatches(crawledDirectories,DIRECTORIES_BATCH_SIZE,DELAY); + /** + * Flattens a 3D array of ccFilesResults into a 1D array using the reduce method. + * The resulting array will contain all the elements from the nested arrays. + * + * @param {Array} ccFilesResults - The 3D array of ccFilesResults to be flattened. + * @returns {Array} - The flattened 1D array of ccFilesResults. + */ + const flattedResult = flattenCCFilesResults(ccFilesResults); + return flattedResult; + } catch (error) { + throw new Error(error); + } + }, +}; diff --git a/src/server/api/drivers/GithubCrawlerDriver.js b/src/server/api/drivers/GithubCrawlerDriver.js new file mode 100644 index 0000000..4e5563d --- /dev/null +++ b/src/server/api/drivers/GithubCrawlerDriver.js @@ -0,0 +1,5 @@ +module.exports = { + retrieveDefinitionsFromGithub: async function () { + return ['Fetching Github dataset...']; + }, +}; diff --git a/src/server/api/drivers/GoogleBigQueryDriver.js b/src/server/api/drivers/GoogleBigQueryDriver.js new file mode 100644 index 0000000..53a0c61 --- /dev/null +++ b/src/server/api/drivers/GoogleBigQueryDriver.js @@ -0,0 +1,5 @@ +module.exports = { + async retrieveDefinitionsFromBigQuery() { + return ['Fetching big query dataset...']; + } +}; diff --git a/src/server/api/drivers/common-crawl-driver.js b/src/server/api/drivers/common-crawl-driver.js deleted file mode 100644 index f2a194d..0000000 --- a/src/server/api/drivers/common-crawl-driver.js +++ /dev/null @@ -1,44 +0,0 @@ -const { - URL, - INDEX_FILES_BATCH_SIZE, - DELAY, -} = require('../constants/constants'); -const { - retrieveIndexUrlsFromCCServer -} = require('../utils/common-crawl-driver-util'); -const {processBatch} = require('../utils/process-batch'); -const ccFilesPromises = []; - -module.exports = { - retrieveDefinations: async function () { - try { - const crawledFiles = await retrieveIndexUrlsFromCCServer(URL); - - - // Implement a batch processing mechanism to retrieve URLs of index files - // from directories obtained by scraping the Common Crawl server. - for (let i = 0; i < crawledFiles.length; i += INDEX_FILES_BATCH_SIZE) { - const remainingFiles = crawledFiles.length - i; - const batch = crawledFiles.slice( - i, - i + Math.min(INDEX_FILES_BATCH_SIZE, remainingFiles) - ); - const batchPromise = processBatch(batch); - - ccFilesPromises.push(batchPromise); - - if (i + INDEX_FILES_BATCH_SIZE < crawledFiles.length) { - await new Promise((resolve) => setTimeout(resolve, DELAY)); - } - } - - - - const ccFilesResults = await Promise.all(ccFilesPromises); - const flattedResult = ccFilesResults.flat(); - console.log('Flatten results: ',flattedResult); - } catch (error) { - console.error(error); - } - }, -}; diff --git a/src/server/api/drivers/google-big-query-driver.js b/src/server/api/drivers/google-big-query-driver.js deleted file mode 100644 index 5a24ed7..0000000 --- a/src/server/api/drivers/google-big-query-driver.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - async googleBigQueryCrawler() { - console.log('Crawl for Big query dataset...'); - } -} - -module.exports = GoogleBigQueryDriver; - diff --git a/src/server/api/services/download-service.js b/src/server/api/services/DownloadService.js similarity index 66% rename from src/server/api/services/download-service.js rename to src/server/api/services/DownloadService.js index 2528e0f..522e15c 100644 --- a/src/server/api/services/download-service.js +++ b/src/server/api/services/DownloadService.js @@ -1,5 +1,11 @@ const axios = require('axios'); module.exports = { + /** + * Downloads a file from the https://index.commoncrawl.org/ URL using the GET method and stream response type. + * Provides download progress information while downloading the file. + * @param {string} url - The URL of the file to be downloaded. + * @returns {Promise} - A promise that resolves to the downloaded file stream. + */ downloadFile: async function (url) { try { return await axios({ diff --git a/src/server/api/services/parse-service.js b/src/server/api/services/ParseService.js similarity index 100% rename from src/server/api/services/parse-service.js rename to src/server/api/services/ParseService.js diff --git a/src/server/api/services/validate-service.js b/src/server/api/services/ValidateService.js similarity index 100% rename from src/server/api/services/validate-service.js rename to src/server/api/services/ValidateService.js diff --git a/src/server/api/utils/common-crawl-driver-util.js b/src/server/api/utils/CommonCrawlDriverUtil.js similarity index 67% rename from src/server/api/utils/common-crawl-driver-util.js rename to src/server/api/utils/CommonCrawlDriverUtil.js index 3bf5b74..1c79039 100644 --- a/src/server/api/utils/common-crawl-driver-util.js +++ b/src/server/api/utils/CommonCrawlDriverUtil.js @@ -2,10 +2,10 @@ const axios = require('axios'); const cheerio = require('cheerio'); const readline = require('readline'); const zlib = require('zlib'); -const { downloadFile } = require('../services/download-service'); +const { downloadFile } = require('../services/DownloadService'); module.exports = { - retrieveUrlsForIndexFiles: async function (url) { + retrieveIndexFilesUrlsFromDirs: async function (url) { try { const response = await downloadFile(url); const gunzip = zlib.createGunzip(); @@ -23,15 +23,22 @@ module.exports = { return links; } catch (error) { - console.error(error.message); + throw new Error(error); } }, - retrieveIndexUrlsFromCCServer: async function (url) { + retrieveUrlsDirectoriesFromCCServer: async function (url,dataFetchingFlag) { try { const links = []; const { data } = await axios.get(url); const html = data; const $ = await cheerio.load(html); + if(!dataFetchingFlag) { + const row = $('tbody tr')[0]; + const linkTd = $(row).find('td:last-child'); + const link = linkTd.find('a').attr('href'); + links.push(link); + return links; + } $('tbody tr').each((index, row) => { const linkTd = $(row).find('td:last-child'); const link = linkTd.find('a').attr('href'); @@ -39,7 +46,7 @@ module.exports = { }); return links; } catch (error) { - console.log(error); + throw new Error(error); } } }; diff --git a/src/server/api/utils/FlattenCCFilesResults.js b/src/server/api/utils/FlattenCCFilesResults.js new file mode 100644 index 0000000..adf1cae --- /dev/null +++ b/src/server/api/utils/FlattenCCFilesResults.js @@ -0,0 +1,5 @@ +module.exports = { + flattenCCFilesResults: async function (ccFilesResults) { + return ccFilesResults.reduce((acc, curr) => acc.concat(...curr), []); + }, +}; diff --git a/src/server/api/utils/ProcessBatch.js b/src/server/api/utils/ProcessBatch.js new file mode 100644 index 0000000..4b96091 --- /dev/null +++ b/src/server/api/utils/ProcessBatch.js @@ -0,0 +1,19 @@ +const { + retrieveIndexFilesUrlsFromDirs, +} = require('./CommonCrawlDriverUtil'); +module.exports = { + processBatch: async function (batch) { + try { + const batchPromises = batch.map(async (dir) => { + const urls = await retrieveIndexFilesUrlsFromDirs(dir); + return urls; + }); + + const batchResults = await Promise.all(batchPromises); + return batchResults; + } + catch(error) { + throw new Error(error); + } + }, +}; diff --git a/src/server/api/utils/ProcessDirectoriesInBatches.js b/src/server/api/utils/ProcessDirectoriesInBatches.js new file mode 100644 index 0000000..34633f7 --- /dev/null +++ b/src/server/api/utils/ProcessDirectoriesInBatches.js @@ -0,0 +1,34 @@ +const { processBatch } = require('./ProcessBatch'); + +module.exports = { + processDirectoriesInBatches: async function ( + crawledDirectories, + DIRECTORIES_BATCH_SIZE, + DELAY + ) { + try { + const ccFilesPromises = []; + for ( + let dir = 0; + dir < crawledDirectories.length; + dir += DIRECTORIES_BATCH_SIZE + ) { + const remainingFiles = crawledDirectories.length - dir; + const batch = crawledDirectories.slice( + dir, + dir + Math.min(DIRECTORIES_BATCH_SIZE, remainingFiles) + ); + const batchPromise = processBatch(batch); + + ccFilesPromises.push(batchPromise); + + if (dir + DIRECTORIES_BATCH_SIZE < crawledDirectories.length) { + await new Promise((resolve) => setTimeout(resolve, DELAY)); + } + } + return await Promise.all(ccFilesPromises); + } catch (error) { + throw new Error(error); + } + }, +}; diff --git a/src/server/api/utils/SelectDataSources.js b/src/server/api/utils/SelectDataSources.js new file mode 100644 index 0000000..849f493 --- /dev/null +++ b/src/server/api/utils/SelectDataSources.js @@ -0,0 +1,21 @@ +const { retrieveDefinitionsFromCC } = require('../drivers/CommonCrawlDriver'); +const { + retrieveDefinitionsFromBigQuery, +} = require('../drivers/GoogleBigQueryDriver'); +const { + retrieveDefinitionsFromGithub, +} = require('../drivers/GithubCrawlerDriver'); +module.exports = { + selectDataSources: async function (dataSource, dataFetchingFlag) { + switch (dataSource) { + case 'commonCrawl': + return await retrieveDefinitionsFromCC(dataFetchingFlag); + case 'github': + return await retrieveDefinitionsFromGithub(); + case 'bigQuery': + return await retrieveDefinitionsFromBigQuery(); + default: + return res.badRequest('Invalid data source'); + } + }, +}; diff --git a/src/server/api/utils/process-batch.js b/src/server/api/utils/process-batch.js deleted file mode 100644 index 947a183..0000000 --- a/src/server/api/utils/process-batch.js +++ /dev/null @@ -1,14 +0,0 @@ -const { - retrieveUrlsForIndexFiles, -} = require('./common-crawl-driver-util'); -module.exports = { - processBatch: async function (batch) { - const batchPromises = batch.map(async (r) => { - const urls = await retrieveUrlsForIndexFiles(r); - return urls; - }); - - const batchResults = await Promise.all(batchPromises); - return batchResults; - }, -}; diff --git a/src/server/config/routes.js b/src/server/config/routes.js index abd3c63..73230ce 100644 --- a/src/server/config/routes.js +++ b/src/server/config/routes.js @@ -10,6 +10,15 @@ module.exports.routes = { - '/api/v1/run/crawler': 'CrawlingController.start-crawling' + /** + * payload for a POST route + * + * dataSource: commonCrawl; + * dataSource: bigQuery; + * dataSource: github; + * dataSource: web; + * etc... + */ + 'POST /api/v1/run/crawler': 'CrawlingController.start-crawling' }; From a3a6319000810b54207781f3de21cf22f5473d9c Mon Sep 17 00:00:00 2001 From: priyanshu-kun Date: Mon, 26 Jun 2023 14:19:15 +0530 Subject: [PATCH 09/11] Implement backoff for retriving index files URLs from CC server. --- Dummy App/README.md | 1 - Dummy App/client/.gitignore | 25 - Dummy App/client/index.html | 118 --- Dummy App/client/javascript.svg | 1 - Dummy App/client/main.js | 66 -- Dummy App/client/package.json | 17 - Dummy App/client/public/logo.svg | 1 - Dummy App/client/public/vite.svg | 1 - Dummy App/client/style.css | 96 -- Dummy App/client/yarn.lock | 284 ----- Dummy App/server/.gitignore | 2 - Dummy App/server/index.js | 50 - Dummy App/server/package.json | 24 - Dummy App/server/services/crawling.service.js | 112 -- Dummy App/server/services/cronjob.service.js | 76 -- Dummy App/server/services/indexing.service.js | 50 - Dummy App/server/services/search.service.js | 27 - Dummy App/server/yarn.lock | 974 ------------------ src/server/api/constants/Constants.js | 2 +- .../api/controllers/CrawlingController.js | 66 +- src/server/api/drivers/CommonCrawlDriver.js | 54 +- .../api/drivers/GoogleBigQueryDriver.js | 2 +- src/server/api/services/DownloadService.js | 7 +- src/server/api/utils/CommonCrawlDriverUtil.js | 38 +- src/server/api/utils/ExponentialBackOff.js | 56 + src/server/api/utils/FlattenCCFilesResults.js | 8 +- src/server/api/utils/ProcessBatch.js | 35 +- .../api/utils/ProcessDirectoriesInBatches.js | 32 +- src/server/api/utils/SelectDataSources.js | 16 +- src/server/config/routes.js | 11 +- src/server/package-lock.json | 7 +- src/server/package.json | 27 +- 32 files changed, 277 insertions(+), 2009 deletions(-) delete mode 100644 Dummy App/README.md delete mode 100644 Dummy App/client/.gitignore delete mode 100644 Dummy App/client/index.html delete mode 100644 Dummy App/client/javascript.svg delete mode 100644 Dummy App/client/main.js delete mode 100644 Dummy App/client/package.json delete mode 100644 Dummy App/client/public/logo.svg delete mode 100644 Dummy App/client/public/vite.svg delete mode 100644 Dummy App/client/style.css delete mode 100644 Dummy App/client/yarn.lock delete mode 100644 Dummy App/server/.gitignore delete mode 100644 Dummy App/server/index.js delete mode 100644 Dummy App/server/package.json delete mode 100644 Dummy App/server/services/crawling.service.js delete mode 100644 Dummy App/server/services/cronjob.service.js delete mode 100644 Dummy App/server/services/indexing.service.js delete mode 100644 Dummy App/server/services/search.service.js delete mode 100644 Dummy App/server/yarn.lock create mode 100644 src/server/api/utils/ExponentialBackOff.js diff --git a/Dummy App/README.md b/Dummy App/README.md deleted file mode 100644 index 445c09c..0000000 --- a/Dummy App/README.md +++ /dev/null @@ -1 +0,0 @@ -# Dummy openapi web search \ No newline at end of file diff --git a/Dummy App/client/.gitignore b/Dummy App/client/.gitignore deleted file mode 100644 index 57e09c4..0000000 --- a/Dummy App/client/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -.env -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? \ No newline at end of file diff --git a/Dummy App/client/index.html b/Dummy App/client/index.html deleted file mode 100644 index 055cc2e..0000000 --- a/Dummy App/client/index.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - OpenAPI Web Search - - - -
    - -

    Dummy OpenAPI Web Search

    -
    -
    - - -
    -
      -

      Loading...

      -

      Search results will be displayed here...

      -
    -
    -

    Note -

    -

    These URLs are part of a set of test cases I've prepared for evaluating the search - functionality of our app, which allows users to search for documents based on keywords. Feel free to try out - these URLs content as keywords in the dummy app and see how the search algorithm performs.

    -
      -
    • - https://api.sinao.app/v1/swagger.yaml -
    • -
    • - http://47.92.32.107/mas/openapi/pages.do?method=exPlay&appKey=gov&id=102&autoPlay=false -
    • -
    • - http://20.106.255.136:1020/swagger -
    • -
    • - http://20.106.255.136:1020/swagger/index.html -
    • -
    • - http://61.183.214.214:81/mas/openapi/pages.do?method=exPlay&appKey=gov&type=vod&id=174&docId=53825 -
    • -
    • - http://89.108.88.254:81/swagger/index.html -
    • -
    • - https://apis.government.ae/swagger/ui/index -
    • -
    • - https://mt-market-data-client-api-v1.vint-hill.agiliumtrade.ai/swagger/ -
    • -
    • - https://beta.aito.ai/docs/swagger/ -
    • -
    • - https://kontent.ai/learn/reference/openapi/delivery-api/ -
    • -
    • - https://kontent.ai/learn/reference/openapi/subscription-api/ -
    • -
    • - https://docs.moveworks.ai/openapi/reference/ -
    • -
    • - https://blog.noodle.ai/tag/swagger/ -
    • -
    • - https://rockstar.ai/tags/swagger -
    • -
    • - https://www.teneo.ai/documentation/7.0.3/swagger/teneo-inquire/client/index.html -
    • -
    • - https://www.teneo.ai/documentation/7.1.0/swagger/teneo-inquire/client/index.html -
    • -
    • - https://www.teneo.ai/documentation/7.1.0/swagger/teneo-manager/client/index.html -
    • -
    • - https://aakira.app/tags/openapi/ -
    • -
    • - https://aakira.app/tags/swagger/ -
    • -
    • - https://base.assembled.app/api/swagger -
    • -
    • - https://ndcportal.app/swagger/ -
    • -
    • - https://carbon-api.red-river.app/swagger/index.html -
    • -
    • - https://api.responsum.app/responsum/swagger/responsumPublicApi -
    • -
    • - https://api.responsum.app/responsum/swagger/responsumPublicApi -
    • -
    • - https://stirling-brandworks-website-32e7c7avs-stirling-brandworks.vercel.app/tags/insights/tag/swagger/ -
    • -
    • - https://stirling-brandworks-website-he9ev6t2e-stirling-brandworks.vercel.app/tags/insights/tag/swagger/ -
    • -
    -
    - - - diff --git a/Dummy App/client/javascript.svg b/Dummy App/client/javascript.svg deleted file mode 100644 index f9abb2b..0000000 --- a/Dummy App/client/javascript.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Dummy App/client/main.js b/Dummy App/client/main.js deleted file mode 100644 index e01dc3d..0000000 --- a/Dummy App/client/main.js +++ /dev/null @@ -1,66 +0,0 @@ -import './style.css' -import axios from "axios" -const input = document.getElementById("search_field"); -const button = document.querySelector(".search_button") -const searchResults = document.querySelector(".results"); -const loader = document.querySelector(".loader"); -const initialMsg = document.querySelector(".initial_msg") -let query = "" -input.value = query; - -loader.style.display = "none"; - - - -function renderResults(data) { - if(data.length === 0) { - searchResults.innerHTML = "NOT FOUND!" - return; - } - let output = ``; - data.forEach(d => { - output += d; - }) - searchResults.innerHTML = output - searchResults.style.textAlign = "left"; -} - -function makeOutput(data) { - const results = data.map(d => `
  • ${d._source.body.url}
  • `); - renderResults(results) -} - - -async function makeSearch() { - try { - loader.style.display = "block"; - initialMsg.style.display = "none"; - const response = await axios.get(`${import.meta.env.VITE_SERVER_URL_CLOUD}/search`,{ - params: { - q: query - } - }) - makeOutput(response.data) - loader.style.display = "none"; - initialMsg.style.display = "block"; - input.value = "" - query = "" - } - catch(e) { - console.error("Something got wrong.",e) - } -} - - -input.addEventListener("input",(e) => { - query = e.target.value; -}) - -button.addEventListener("click",(e) => { - e.preventDefault() - if(query === "") { - alert("Input cannot be empty!") - return; - } - makeSearch(); -}) diff --git a/Dummy App/client/package.json b/Dummy App/client/package.json deleted file mode 100644 index fa6b7a8..0000000 --- a/Dummy App/client/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "client", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "devDependencies": { - "vite": "^4.2.0" - }, - "dependencies": { - "axios": "^1.3.4" - } -} diff --git a/Dummy App/client/public/logo.svg b/Dummy App/client/public/logo.svg deleted file mode 100644 index 50ee1e3..0000000 --- a/Dummy App/client/public/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Dummy App/client/public/vite.svg b/Dummy App/client/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/Dummy App/client/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Dummy App/client/style.css b/Dummy App/client/style.css deleted file mode 100644 index a57f331..0000000 --- a/Dummy App/client/style.css +++ /dev/null @@ -1,96 +0,0 @@ -body { - font-family: 'Inter', sans-serif; - font-weight: 500; - padding-bottom: 60px; -} - -.app_header { - width: fit-content; - height: 300px; - margin: 100px auto 20px auto; -} - -.app_header_logo { - width: 200px; - height: auto; - display: block; - margin: auto; -} - -.app_header_title { - font-weight: 900; - font-size: 40px; - color: rgb(46, 46, 46); -} - -.search_form { - margin: 10px auto 20px auto; - width: fit-content; - display: flex; - align-items: center; - justify-content: center; -} - -.note { - padding: 30px; - border-radius: 30px; - background-color: rgb(254, 224, 224); - margin: 0 auto; - width: 800px; - border: 1px solid rgb(209, 49, 49); -} - -.results { - margin: 40px auto; - width: 800px; - background-color: rgb(242, 242, 242); - border-radius: 30px; - padding: 30px 60px; - text-align: center; -} - -.note_message { - font-size: 0.8rem; - color: rgb(255, 86, 86); - width: 80%; - margin: 20px 0; -} - -.note_list_items { - margin-bottom: 6px; -} - -#search_field { - font-size: 1.2rem; - border-radius: 30px; - border: 3px solid black; - display: inline-block; - width: 400px; - padding: 12px 30px; - margin-right: 10px; -} - -#search_field::placeholder { - font-size: 0.8rem; -} - -.search_button { - padding: 12px 20px; - font-size: 1rem; - border-radius: 10px; - border: none; - background-color: black; - color: white; - cursor: pointer; - box-shadow: 2px 3px 6px 0 rgba(0,0,0,0.3); - transition: all 0.3s ease; -} - -.search_button:hover { - text-decoration: underline; - transform: translateY(-1px); -} - -.search_button:active { - transform: scale(0.97); -} \ No newline at end of file diff --git a/Dummy App/client/yarn.lock b/Dummy App/client/yarn.lock deleted file mode 100644 index a077bc3..0000000 --- a/Dummy App/client/yarn.lock +++ /dev/null @@ -1,284 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@esbuild/android-arm64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.14.tgz#4624cea3c8941c91f9e9c1228f550d23f1cef037" - integrity sha512-eLOpPO1RvtsP71afiFTvS7tVFShJBCT0txiv/xjFBo5a7R7Gjw7X0IgIaFoLKhqXYAXhahoXm7qAmRXhY4guJg== - -"@esbuild/android-arm@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.14.tgz#74fae60fcab34c3f0e15cb56473a6091ba2b53a6" - integrity sha512-0CnlwnjDU8cks0yJLXfkaU/uoLyRf9VZJs4p1PskBr2AlAHeEsFEwJEo0of/Z3g+ilw5mpyDwThlxzNEIxOE4g== - -"@esbuild/android-x64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.14.tgz#f002fbc08d5e939d8314bd23bcfb1e95d029491f" - integrity sha512-nrfQYWBfLGfSGLvRVlt6xi63B5IbfHm3tZCdu/82zuFPQ7zez4XjmRtF/wIRYbJQ/DsZrxJdEvYFE67avYXyng== - -"@esbuild/darwin-arm64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.14.tgz#b8dcd79a1dd19564950b4ca51d62999011e2e168" - integrity sha512-eoSjEuDsU1ROwgBH/c+fZzuSyJUVXQTOIN9xuLs9dE/9HbV/A5IqdXHU1p2OfIMwBwOYJ9SFVGGldxeRCUJFyw== - -"@esbuild/darwin-x64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.14.tgz#4b49f195d9473625efc3c773fc757018f2c0d979" - integrity sha512-zN0U8RWfrDttdFNkHqFYZtOH8hdi22z0pFm0aIJPsNC4QQZv7je8DWCX5iA4Zx6tRhS0CCc0XC2m7wKsbWEo5g== - -"@esbuild/freebsd-arm64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.14.tgz#480923fd38f644c6342c55e916cc7c231a85eeb7" - integrity sha512-z0VcD4ibeZWVQCW1O7szaLxGsx54gcCnajEJMdYoYjLiq4g1jrP2lMq6pk71dbS5+7op/L2Aod+erw+EUr28/A== - -"@esbuild/freebsd-x64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.14.tgz#a6b6b01954ad8562461cb8a5e40e8a860af69cbe" - integrity sha512-hd9mPcxfTgJlolrPlcXkQk9BMwNBvNBsVaUe5eNUqXut6weDQH8whcNaKNF2RO8NbpT6GY8rHOK2A9y++s+ehw== - -"@esbuild/linux-arm64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.14.tgz#1fe2f39f78183b59f75a4ad9c48d079916d92418" - integrity sha512-FhAMNYOq3Iblcj9i+K0l1Fp/MHt+zBeRu/Qkf0LtrcFu3T45jcwB6A1iMsemQ42vR3GBhjNZJZTaCe3VFPbn9g== - -"@esbuild/linux-arm@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.14.tgz#18d594a49b64e4a3a05022c005cb384a58056a2a" - integrity sha512-BNTl+wSJ1omsH8s3TkQmIIIQHwvwJrU9u1ggb9XU2KTVM4TmthRIVyxSp2qxROJHhZuW/r8fht46/QE8hU8Qvg== - -"@esbuild/linux-ia32@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.14.tgz#f7f0182a9cfc0159e0922ed66c805c9c6ef1b654" - integrity sha512-91OK/lQ5y2v7AsmnFT+0EyxdPTNhov3y2CWMdizyMfxSxRqHazXdzgBKtlmkU2KYIc+9ZK3Vwp2KyXogEATYxQ== - -"@esbuild/linux-loong64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.14.tgz#5f5305fdffe2d71dd9a97aa77d0c99c99409066f" - integrity sha512-vp15H+5NR6hubNgMluqqKza85HcGJgq7t6rMH7O3Y6ApiOWPkvW2AJfNojUQimfTp6OUrACUXfR4hmpcENXoMQ== - -"@esbuild/linux-mips64el@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.14.tgz#a602e85c51b2f71d2aedfe7f4143b2f92f97f3f5" - integrity sha512-90TOdFV7N+fgi6c2+GO9ochEkmm9kBAKnuD5e08GQMgMINOdOFHuYLPQ91RYVrnWwQ5683sJKuLi9l4SsbJ7Hg== - -"@esbuild/linux-ppc64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.14.tgz#32d918d782105cbd9345dbfba14ee018b9c7afdf" - integrity sha512-NnBGeoqKkTugpBOBZZoktQQ1Yqb7aHKmHxsw43NddPB2YWLAlpb7THZIzsRsTr0Xw3nqiPxbA1H31ZMOG+VVPQ== - -"@esbuild/linux-riscv64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.14.tgz#38612e7b6c037dff7022c33f49ca17f85c5dec58" - integrity sha512-0qdlKScLXA8MGVy21JUKvMzCYWovctuP8KKqhtE5A6IVPq4onxXhSuhwDd2g5sRCzNDlDjitc5sX31BzDoL5Fw== - -"@esbuild/linux-s390x@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.14.tgz#4397dff354f899e72fd035d72af59a700c465ccb" - integrity sha512-Hdm2Jo1yaaOro4v3+6/zJk6ygCqIZuSDJHdHaf8nVH/tfOuoEX5Riv03Ka15LmQBYJObUTNS1UdyoMk0WUn9Ww== - -"@esbuild/linux-x64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.14.tgz#6c5cb99891b6c3e0c08369da3ef465e8038ad9c2" - integrity sha512-8KHF17OstlK4DuzeF/KmSgzrTWQrkWj5boluiiq7kvJCiQVzUrmSkaBvcLB2UgHpKENO2i6BthPkmUhNDaJsVw== - -"@esbuild/netbsd-x64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.14.tgz#5fa5255a64e9bf3947c1b3bef5e458b50b211994" - integrity sha512-nVwpqvb3yyXztxIT2+VsxJhB5GCgzPdk1n0HHSnchRAcxqKO6ghXwHhJnr0j/B+5FSyEqSxF4q03rbA2fKXtUQ== - -"@esbuild/openbsd-x64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.14.tgz#74d14c79dcb6faf446878cc64284aa4e02f5ca6f" - integrity sha512-1RZ7uQQ9zcy/GSAJL1xPdN7NDdOOtNEGiJalg/MOzeakZeTrgH/DoCkbq7TaPDiPhWqnDF+4bnydxRqQD7il6g== - -"@esbuild/sunos-x64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.14.tgz#5c7d1c7203781d86c2a9b2ff77bd2f8036d24cfa" - integrity sha512-nqMjDsFwv7vp7msrwWRysnM38Sd44PKmW8EzV01YzDBTcTWUpczQg6mGao9VLicXSgW/iookNK6AxeogNVNDZA== - -"@esbuild/win32-arm64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.14.tgz#dc36ed84f1390e73b6019ccf0566c80045e5ca3d" - integrity sha512-xrD0mccTKRBBIotrITV7WVQAwNJ5+1va6L0H9zN92v2yEdjfAN7864cUaZwJS7JPEs53bDTzKFbfqVlG2HhyKQ== - -"@esbuild/win32-ia32@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.14.tgz#0802a107afa9193c13e35de15a94fe347c588767" - integrity sha512-nXpkz9bbJrLLyUTYtRotSS3t5b+FOuljg8LgLdINWFs3FfqZMtbnBCZFUmBzQPyxqU87F8Av+3Nco/M3hEcu1w== - -"@esbuild/win32-x64@0.17.14": - version "0.17.14" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.14.tgz#e81fb49de05fed91bf74251c9ca0343f4fc77d31" - integrity sha512-gPQmsi2DKTaEgG14hc3CHXHp62k8g6qr0Pas+I4lUxRMugGSATh/Bi8Dgusoz9IQ0IfdrvLpco6kujEIBoaogA== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -axios@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.4.tgz#f5760cefd9cfb51fd2481acf88c05f67c4523024" - integrity sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ== - dependencies: - follow-redirects "^1.15.0" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -esbuild@^0.17.5: - version "0.17.14" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.14.tgz#d61a22de751a3133f3c6c7f9c1c3e231e91a3245" - integrity sha512-vOO5XhmVj/1XQR9NQ1UPq6qvMYL7QFJU57J5fKBKBKxp17uDt5PgxFDb4A2nEiXhr1qQs4x0F5+66hVVw4ruNw== - optionalDependencies: - "@esbuild/android-arm" "0.17.14" - "@esbuild/android-arm64" "0.17.14" - "@esbuild/android-x64" "0.17.14" - "@esbuild/darwin-arm64" "0.17.14" - "@esbuild/darwin-x64" "0.17.14" - "@esbuild/freebsd-arm64" "0.17.14" - "@esbuild/freebsd-x64" "0.17.14" - "@esbuild/linux-arm" "0.17.14" - "@esbuild/linux-arm64" "0.17.14" - "@esbuild/linux-ia32" "0.17.14" - "@esbuild/linux-loong64" "0.17.14" - "@esbuild/linux-mips64el" "0.17.14" - "@esbuild/linux-ppc64" "0.17.14" - "@esbuild/linux-riscv64" "0.17.14" - "@esbuild/linux-s390x" "0.17.14" - "@esbuild/linux-x64" "0.17.14" - "@esbuild/netbsd-x64" "0.17.14" - "@esbuild/openbsd-x64" "0.17.14" - "@esbuild/sunos-x64" "0.17.14" - "@esbuild/win32-arm64" "0.17.14" - "@esbuild/win32-ia32" "0.17.14" - "@esbuild/win32-x64" "0.17.14" - -follow-redirects@^1.15.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -nanoid@^3.3.4: - version "3.3.6" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -postcss@^8.4.21: - version "8.4.21" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" - integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== - dependencies: - nanoid "^3.3.4" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -resolve@^1.22.1: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -rollup@^3.18.0: - version "3.20.2" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.20.2.tgz#f798c600317f216de2e4ad9f4d9ab30a89b690ff" - integrity sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg== - optionalDependencies: - fsevents "~2.3.2" - -source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -vite@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/vite/-/vite-4.2.1.tgz#6c2eb337b0dfd80a9ded5922163b94949d7fc254" - integrity sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg== - dependencies: - esbuild "^0.17.5" - postcss "^8.4.21" - resolve "^1.22.1" - rollup "^3.18.0" - optionalDependencies: - fsevents "~2.3.2" diff --git a/Dummy App/server/.gitignore b/Dummy App/server/.gitignore deleted file mode 100644 index 307beae..0000000 --- a/Dummy App/server/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/.env -/node_modules \ No newline at end of file diff --git a/Dummy App/server/index.js b/Dummy App/server/index.js deleted file mode 100644 index ae1a4a0..0000000 --- a/Dummy App/server/index.js +++ /dev/null @@ -1,50 +0,0 @@ -const express = require("express") -require("dotenv").config() -const app = express() -const { Client } = require('@elastic/elasticsearch') -const { startCronJob } = require("./services/cronjob.service") -const fs = require("fs") -const { searchOpenAPI } = require("./services/search.service") -const cors = require("cors") -app.use(cors()) -const client = new Client({ - cloud: { - id: process.env.ELASTIC_CLOUD, - }, - auth: { - username: process.env.ELASTIC_USERNAME, - password: process.env.ELASTIC_PASSWORD - } -}) - -client.ping().then(res => { - console.log("DB connected successfully!") -}) -.catch(e => { - console.log("Failed to connect!",e) -}) - - -// startCronJob(client) - - -app.get("/",(req,res) => { - res.json({ - "msg": "It's working" - }) -}) - -app.get('/search', async (req, res) => { - try { - const response = await searchOpenAPI(client,req.query.q); - res.json(response) - } - catch(e) { - console.log(e) - } -}) - -const port = process.env.PORT || 8081 -app.listen(port, () => { - console.log(`App listening on port ${port}`) -}) \ No newline at end of file diff --git a/Dummy App/server/package.json b/Dummy App/server/package.json deleted file mode 100644 index ad26def..0000000 --- a/Dummy App/server/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "server", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "scripts": { - "dev": "nodemon index.js", - "prod": "node index.js" - }, - "dependencies": { - "@elastic/elasticsearch": "^8.6.0", - "axios": "^1.3.4", - "cheerio": "^1.0.0-rc.12", - "cors": "^2.8.5", - "dotenv": "^16.0.3", - "express": "^4.18.2", - "node-cron": "^3.0.2", - "swagger-parser": "^10.0.3", - "zlib": "^1.0.5" - }, - "devDependencies": { - "nodemon": "^2.0.22" - } -} diff --git a/Dummy App/server/services/crawling.service.js b/Dummy App/server/services/crawling.service.js deleted file mode 100644 index b8e4ab8..0000000 --- a/Dummy App/server/services/crawling.service.js +++ /dev/null @@ -1,112 +0,0 @@ -const axios = require("axios") -const cheerio = require("cheerio") -const readline = require("readline") -const fs = require("fs") -const zlib = require("zlib") - - -class Crawling { - async downloadFile(url, path) { - const response = await axios({ - url, - method: 'GET', - responseType: 'stream', - onDownloadProgress: function (progressEvent) { - const total = progressEvent.total; - const downloaded = progressEvent.loaded; - - const percent = Math.round((downloaded / total) * 100); - - process.stdout.clearLine(); - process.stdout.cursorTo(0); - process.stdout.write(`Downloading: ${percent}% (${downloaded}/${total} bytes)`); - } - }); - - const fileStream = fs.createWriteStream(path); - response.data.pipe(zlib.createGunzip()).pipe(fileStream); - - return new Promise((resolve, reject) => { - fileStream.on('close', () => { - resolve(); - }); - - fileStream.on('error', (err) => { - reject(err); - }); - }); - } - - async getDataFromFiles(url) { - try { - const response = await axios.get(url, { responseType: 'stream' }); - const gunzip = zlib.createGunzip(); - const lines = readline.createInterface({ input: response.data.pipe(gunzip) }); - - const links = []; - - for await (const line of lines) { - const regex = /\.gz$/; - if (!regex.test(line)) { - continue; - } - links.push(`https://data.commoncrawl.org/${line}`); - } - - return links; - } catch (e) { - // handle errors gracefully - console.log(e); - } - } - async removeFile(url) { - try { - fs.unlink(url, (err) => { - if (err) throw err; - console.log('File deleted!'); - }); - } - catch (e) { - console.log(e) - } - } - async getDataFromCommomCrawlServer(url) { - try { - const links = []; - const { data } = await axios.get(url); - const html = data; - const $ = await cheerio.load(html); - $('tbody tr').each((index, row) => { - const linkTd = $(row).find('td:last-child'); - const link = linkTd.find('a').attr('href'); - links.push(link) - }); - return links; - } - catch (e) { - // handle errors gracefully - console.log(e) - } - } - parsing(text) { - const urlRegex = /http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+/gi; - const matchUrls = text.match(urlRegex) - const parsedUrls = []; - if (matchUrls) { - const keywordReg = /^(?:https?:\/\/)?[^\/\s]+(?:\/[^\/\s]+)*(?:\/(openapi|swagger))(?:\/[^\/\s]*)*$/gi; - const subDomainReg = /^(?:https?:\/\/)?api\.[^\/\s]+\.[^\/\s]+(?:\/[^\/\s]*)*$/gi; - matchUrls.forEach(url => { - const tokens = url.split('/'); - const ext = tokens[tokens.length - 1]; - const rg = /^(openapi|swagger)\.(json|yaml|yml)(\?[\w=&]+)?$/ - if (keywordReg.test(url) || rg.test(ext)) { - parsedUrls.push(url) - } - }) - } - if(parsedUrls.length !== 0) - return parsedUrls; - } -} - -module.exports = new Crawling() \ No newline at end of file diff --git a/Dummy App/server/services/cronjob.service.js b/Dummy App/server/services/cronjob.service.js deleted file mode 100644 index 94db517..0000000 --- a/Dummy App/server/services/cronjob.service.js +++ /dev/null @@ -1,76 +0,0 @@ -const cron = require("node-cron") -const fs = require("fs") -const CHUNK_SIZE = 1024 * 1024 * 1; // 1 MB chunk size -const URL = "https://index.commoncrawl.org/" -const { getDataFromCommomCrawlServer, getDataFromFiles, downloadFile, removeFile, parsing } = require("./crawling.service"); -const { bulkIndexOpenAPIs } = require("./indexing.service"); -const urlsForIndexing = []; - - -function readContent(client,links, idx) { - if (idx < links.length) { - downloadFile(links[idx], './data/output.txt') - .then(async () => { - const readStream = fs - .createReadStream('./data/output.txt', - { highWaterMark: CHUNK_SIZE }); - readStream.on('data', chunk => { - const text = chunk.toString(); - const parsedUrls = parsing(text) - if(parsedUrls !== undefined) { - urlsForIndexing.push(parsedUrls) - } - }); - - readStream.on('end', () => { - removeFile("./data/output.txt").then((res) => { - const flattedUrlsFroIndexing = urlsForIndexing.flat() - console.log(flattedUrlsFroIndexing) - bulkIndexOpenAPIs(client,flattedUrlsFroIndexing).then(res => { - readContent(client,links, idx + 1); - }) - .catch(e => { - console.error('Error while Indexing: ',e); - return; - }) - }).catch(e => { - console.error('Error while deleting file:', e) - return; - }) - }); - - readStream.on('error', err => { - console.error(err); - return; - }); - }) - .catch((err) => { - console.error('Error downloading file:', err) - return; - }); - } - -} - - -class Cron { - startCronJob(client) { - getDataFromCommomCrawlServer(URL).then(async res => { - const ccFilesPromises = res.map(async r => await getDataFromFiles(r)); - const results = await Promise.all(ccFilesPromises); - const links = results.flat() - readContent(client,links, 0) - }) - cron.schedule('0 0 * * 0', () => { - getDataFromCommomCrawlServer(URL).then(async res => { - const ccFilesPromises = res.map(async r => await getDataFromFiles(r)); - const results = await Promise.all(ccFilesPromises); - const links = results.flat() - readContent(client,links, 0) - }) - - }) - } -} - -module.exports = new Cron() \ No newline at end of file diff --git a/Dummy App/server/services/indexing.service.js b/Dummy App/server/services/indexing.service.js deleted file mode 100644 index e8b9be4..0000000 --- a/Dummy App/server/services/indexing.service.js +++ /dev/null @@ -1,50 +0,0 @@ -const axios = require("axios") -const SwaggerParser = require("swagger-parser") - -class Indexing { - async bulkIndexOpenAPIs(client, urls) { - // Create an array of bulk index actions for each OpenAPI document - const bulkActions = []; - - for (const url of urls) { - try { - const response = await axios.get(url); - const tokens = url.split('/'); - const ext = tokens[tokens.length - 1]; - const rg = /^(openapi|swagger)\.(json|yaml|yml)(\?[\w=&]+)?$/ - let document = null; - if(rg.test(ext)) { - document = await SwaggerParser.parse(response.data); - } - - bulkActions.push({ - index: { _index: 'openapi_docs' }, - body: { - url, - content: response.data, - contentType: response.headers['content-type'], - info: document?.info, - description: document?.description, - tags: document?.tags - } - }); - console.log("Done: ",url) - } - catch (e) { - console.log("Address not found!"); - } - } - - const result = await client.helpers.bulk({ - datasource: bulkActions, - onDocument() { - return { - index: { _index: 'openapi_docs' } - } - } - }); - } -} - - -module.exports = new Indexing() \ No newline at end of file diff --git a/Dummy App/server/services/search.service.js b/Dummy App/server/services/search.service.js deleted file mode 100644 index a40b067..0000000 --- a/Dummy App/server/services/search.service.js +++ /dev/null @@ -1,27 +0,0 @@ -class Search { - async searchOpenAPI(client, keyword) { - try { - const response = await client.search({ - index: 'openapi_docs', - body: { - query: { - bool: { - must: [ - { match: { "body.content": keyword } } - ] - } - } - } - }); - if (response.hits.total.value === 0) { - throw new Error() - } - return response.hits.hits - } catch (error) { - return []; - } - } - -} - -module.exports = new Search() \ No newline at end of file diff --git a/Dummy App/server/yarn.lock b/Dummy App/server/yarn.lock deleted file mode 100644 index 207e133..0000000 --- a/Dummy App/server/yarn.lock +++ /dev/null @@ -1,974 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@apidevtools/json-schema-ref-parser@^9.0.6": - version "9.1.2" - resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.1.2.tgz#8ff5386b365d4c9faa7c8b566ff16a46a577d9b8" - integrity sha512-r1w81DpR+KyRWd3f+rk6TNqMgedmAxZP5v5KWlXQWlgMUUtyEJch0DKEci1SorPMiSeM8XPl7MZ3miJ60JIpQg== - dependencies: - "@jsdevtools/ono" "^7.1.3" - "@types/json-schema" "^7.0.6" - call-me-maybe "^1.0.1" - js-yaml "^4.1.0" - -"@apidevtools/openapi-schemas@^2.0.4": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz#9fa08017fb59d80538812f03fc7cac5992caaa17" - integrity sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ== - -"@apidevtools/swagger-methods@^3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz#b789a362e055b0340d04712eafe7027ddc1ac267" - integrity sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg== - -"@apidevtools/swagger-parser@10.0.3": - version "10.0.3" - resolved "https://registry.yarnpkg.com/@apidevtools/swagger-parser/-/swagger-parser-10.0.3.tgz#32057ae99487872c4dd96b314a1ab4b95d89eaf5" - integrity sha512-sNiLY51vZOmSPFZA5TF35KZ2HbgYklQnTSDnkghamzLb3EkNtcQnrBQEj5AOCxHpTtXpqMCRM1CrmV2rG6nw4g== - dependencies: - "@apidevtools/json-schema-ref-parser" "^9.0.6" - "@apidevtools/openapi-schemas" "^2.0.4" - "@apidevtools/swagger-methods" "^3.0.2" - "@jsdevtools/ono" "^7.1.3" - call-me-maybe "^1.0.1" - z-schema "^5.0.1" - -"@elastic/elasticsearch@^8.6.0": - version "8.6.0" - resolved "https://registry.yarnpkg.com/@elastic/elasticsearch/-/elasticsearch-8.6.0.tgz#c474f49808deee64b5bc5b8f938bf78f4468cb94" - integrity sha512-mN5EbbgSp1rfRmQ/5Hv7jqAK8xhGJxCg7G84xje8hSefE59P+HPPCv/+DgesCUSJdZpwXIo0DwOWHfHvktxxLw== - dependencies: - "@elastic/transport" "^8.3.1" - tslib "^2.4.0" - -"@elastic/transport@^8.3.1": - version "8.3.1" - resolved "https://registry.yarnpkg.com/@elastic/transport/-/transport-8.3.1.tgz#e7569d7df35b03108ea7aa886113800245faa17f" - integrity sha512-jv/Yp2VLvv5tSMEOF8iGrtL2YsYHbpf4s+nDsItxUTLFTzuJGpnsB/xBlfsoT2kAYEnWHiSJuqrbRcpXEI/SEQ== - dependencies: - debug "^4.3.4" - hpagent "^1.0.0" - ms "^2.1.3" - secure-json-parse "^2.4.0" - tslib "^2.4.0" - undici "^5.5.1" - -"@jsdevtools/ono@^7.1.3": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" - integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== - -"@types/json-schema@^7.0.6": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -axios@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.4.tgz#f5760cefd9cfb51fd2481acf88c05f67c4523024" - integrity sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ== - dependencies: - follow-redirects "^1.15.0" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -body-parser@1.20.1: - version "1.20.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" - 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" - -boolbase@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -busboy@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" - integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== - dependencies: - streamsearch "^1.1.0" - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -call-bind@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -call-me-maybe@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz#03f964f19522ba643b1b0693acb9152fe2074baa" - integrity sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ== - -cheerio-select@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" - integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== - dependencies: - boolbase "^1.0.0" - css-select "^5.1.0" - css-what "^6.1.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - -cheerio@^1.0.0-rc.12: - version "1.0.0-rc.12" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" - integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== - dependencies: - cheerio-select "^2.1.0" - dom-serializer "^2.0.0" - domhandler "^5.0.3" - domutils "^3.0.1" - htmlparser2 "^8.0.1" - parse5 "^7.0.0" - parse5-htmlparser2-tree-adapter "^7.0.0" - -chokidar@^3.5.2: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^9.4.1: - version "9.5.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" - integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" - integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== - -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - -cors@^2.8.5: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - -css-select@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" - integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== - dependencies: - boolbase "^1.0.0" - css-what "^6.1.0" - domhandler "^5.0.2" - domutils "^3.0.1" - nth-check "^2.0.1" - -css-what@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - -debug@2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -dom-serializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" - integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.2" - entities "^4.2.0" - -domelementtype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^5.0.1, domhandler@^5.0.2, domhandler@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" - integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== - dependencies: - domelementtype "^2.3.0" - -domutils@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.0.1.tgz#696b3875238338cb186b6c0612bd4901c89a4f1c" - integrity sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q== - dependencies: - dom-serializer "^2.0.0" - domelementtype "^2.3.0" - domhandler "^5.0.1" - -dotenv@^16.0.3: - version "16.0.3" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" - integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -entities@^4.2.0, entities@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" - integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - -express@^4.18.2: - version "4.18.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" - 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" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - 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" - -follow-redirects@^1.15.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -get-intrinsic@^1.0.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" - integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hpagent@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/hpagent/-/hpagent-1.2.0.tgz#0ae417895430eb3770c03443456b8d90ca464903" - integrity sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA== - -htmlparser2@^8.0.1: - version "8.0.2" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" - integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - entities "^4.4.0" - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - 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" - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ignore-by-default@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" - integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== - -inherits@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== - -lodash.isequal@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" - integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3, ms@^2.1.1, ms@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -node-cron@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/node-cron/-/node-cron-3.0.2.tgz#bb0681342bd2dfb568f28e464031280e7f06bd01" - integrity sha512-iP8l0yGlNpE0e6q1o185yOApANRe47UPbLf4YxfbiNHt/RU5eBcGB/e0oudruheSf+LQeDMezqC5BVAb5wwRcQ== - dependencies: - uuid "8.3.2" - -nodemon@^2.0.22: - version "2.0.22" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.22.tgz#182c45c3a78da486f673d6c1702e00728daf5258" - integrity sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ== - dependencies: - chokidar "^3.5.2" - debug "^3.2.7" - ignore-by-default "^1.0.1" - minimatch "^3.1.2" - pstree.remy "^1.1.8" - semver "^5.7.1" - simple-update-notifier "^1.0.7" - supports-color "^5.5.0" - touch "^3.1.0" - undefsafe "^2.0.5" - -nopt@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" - integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg== - dependencies: - abbrev "1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - -object-assign@^4: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -parse5-htmlparser2-tree-adapter@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" - integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== - dependencies: - domhandler "^5.0.2" - parse5 "^7.0.0" - -parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -pstree.remy@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" - integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== - -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" - 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" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -safe-buffer@5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -secure-json-parse@^2.4.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862" - integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== - -semver@^5.7.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@~7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - 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" - -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -simple-update-notifier@^1.0.7: - version "1.1.0" - resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz#67694c121de354af592b347cdba798463ed49c82" - integrity sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg== - dependencies: - semver "~7.0.0" - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -streamsearch@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" - integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== - -supports-color@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -swagger-parser@^10.0.3: - version "10.0.3" - resolved "https://registry.yarnpkg.com/swagger-parser/-/swagger-parser-10.0.3.tgz#04cb01c18c3ac192b41161c77f81e79309135d03" - integrity sha512-nF7oMeL4KypldrQhac8RyHerJeGPD1p2xDh900GPvc+Nk7nWP6jX2FcC7WmkinMoAmoO774+AFXcWsW8gMWEIg== - dependencies: - "@apidevtools/swagger-parser" "10.0.3" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -touch@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" - integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== - dependencies: - nopt "~1.0.10" - -tslib@^2.4.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -undefsafe@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" - integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== - -undici@^5.5.1: - version "5.21.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.21.0.tgz#b00dfc381f202565ab7f52023222ab862bb2494f" - integrity sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA== - dependencies: - busboy "^1.6.0" - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - -uuid@8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -validator@^13.7.0: - version "13.9.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855" - integrity sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA== - -vary@^1, vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - -z-schema@^5.0.1: - version "5.0.5" - resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-5.0.5.tgz#6805a48c5366a6125cae0e58752babfd503daf32" - integrity sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q== - dependencies: - lodash.get "^4.4.2" - lodash.isequal "^4.5.0" - validator "^13.7.0" - optionalDependencies: - commander "^9.4.1" - -zlib@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/zlib/-/zlib-1.0.5.tgz#6e7c972fc371c645a6afb03ab14769def114fcc0" - integrity sha512-40fpE2II+Cd3k8HWTWONfeKE2jL+P42iWJ1zzps5W51qcTsOUKM5Q5m2PFb0CLxlmFAaUuUdJGc3OfZy947v0w== diff --git a/src/server/api/constants/Constants.js b/src/server/api/constants/Constants.js index 41272bd..5163db8 100644 --- a/src/server/api/constants/Constants.js +++ b/src/server/api/constants/Constants.js @@ -3,4 +3,4 @@ const SCHEDULE = '0 0 * * 0'; const DIRECTORIES_BATCH_SIZE = 10; const DELAY = 1000; -module.exports = {URL,SCHEDULE,DIRECTORIES_BATCH_SIZE,DELAY}; +module.exports = { URL, SCHEDULE, DIRECTORIES_BATCH_SIZE, DELAY }; diff --git a/src/server/api/controllers/CrawlingController.js b/src/server/api/controllers/CrawlingController.js index 0a46c9e..0f89a16 100644 --- a/src/server/api/controllers/CrawlingController.js +++ b/src/server/api/controllers/CrawlingController.js @@ -2,31 +2,63 @@ const { selectDataSources } = require('../utils/SelectDataSources'); module.exports = { /** - * Controller for the 'start-crawling' route. Initiates the crawling process based on the provided data source. - * Retrieves API definitions from the selected data source and sends the response accordingly. - * @param {Object} req - The request object containing the data source and data fetching flag in the body. - * @param {Object} res - The response object to send the result back to the client. - * @returns {Object} - The response containing the retrieved API definitions or appropriate error messages. - * - * note: The dataFetchingFlag is a boolean flag used to determine the data year selection behavior. - * If the flag is set to false, the controller fetches only the latest year's data. - * If the flag is set to true, the controller fetches data from the latest year (2023) down to the year 2009. - * @typedef {boolean} dataFetchingFlag - */ - 'start-crawling': async function (req, res) { + * Endpoint for starting the crawling process. + * Controller for the 'start-crawling' route. Initiates the crawling process based on the provided data source. + * Retrieves API definitions from the selected data source and sends the response accordingly. + * + * @route POST /api/v1/run/crawler + * @param {Object} req - The request object. + * @param {Object} res - The response object. + * @param {Object} req.body - The payload of the request. + * @param {string} req.body.dataSource - The data source for crawling. + * @param {boolean} req.query.latest - Indicates whether to use the latest data. + * @returns {Array} An array of API definition URLs, or an error response. + * @throws {Error} If an error occurs during the crawling process. + * + * @example + * Request body example: + * { + * 'dataSource': 'commonCrawl' + * } + * + * @example + * Query parameter example: + * /api/v1/run/crawler?latest=true + * or + * /api/v1/run/crawler?latest=false + * + * @example + * Response example: + * [ + * 'https://api.example.com/definition1', + * 'https://api.example.com/definition2', + * ... + * ] + */ + 'startCrawling': async function (req, res) { try { const { dataSource } = req.body; - const { dataFetchingFlag } = req.body; + /** + * If req.query.latest is truthy and equals the string 'true', then latest is set to true; else latest is set to false; + * otherwise, it is set to the default value true. + */ + const latest = req.query.latest ? req.query.latest === 'true': true; + let apiDefinitions; + if (!dataSource) { return res.badRequest('Data source not provided'); } - let apiDefinitions = await selectDataSources( - dataSource, - dataFetchingFlag - ); + + try { + apiDefinitions = await selectDataSources(dataSource, latest); + } catch (error) { + throw error; + } + if (!apiDefinitions || apiDefinitions.length === 0) { return res.notFound('No API definitions found'); } + return res.json(apiDefinitions); } catch (error) { return res.serverError(error); diff --git a/src/server/api/drivers/CommonCrawlDriver.js b/src/server/api/drivers/CommonCrawlDriver.js index b578de8..c840fc9 100644 --- a/src/server/api/drivers/CommonCrawlDriver.js +++ b/src/server/api/drivers/CommonCrawlDriver.js @@ -4,37 +4,41 @@ const { DELAY, } = require('../constants/Constants'); const { - retrieveUrlsDirectoriesFromCCServer, + retrieveDirectoriesUrlsFromCCServer, } = require('../utils/CommonCrawlDriverUtil'); +const {ExponentialBackOff} = require('../utils/ExponentialBackOff'); const { flattenCCFilesResults } = require('../utils/FlattenCCFilesResults'); -const { processDirectoriesInBatches } = require('../utils/ProcessDirectoriesInBatches'); +const { + processDirectoriesInBatches, +} = require('../utils/ProcessDirectoriesInBatches'); module.exports = { - retrieveDefinitionsFromCC: async function (dataFetchingFlag) { + /** + * Retrieves API definitions from Common Crawl by performing the following steps: + * 1. Retrieve URLs for directories from the Common Crawl server. + * 2. Process the crawled directories in batches, asynchronously retrieving URLs for index files. + * 3. Flatten the resulting 3D array of API definitions into a 1D array. + * + * @param {boolean} latest - Indicates whether to retrieve the latest data from Common Crawl. + * @returns {Array} The flattened 1D array of ccIndexDirsUrls. + * @throws {Error} If an error occurs during the retrieval process. + */ + retrieveDefinitionsFromCC: async function (latest) { try { - const crawledDirectories = await retrieveUrlsDirectoriesFromCCServer( - URL, - dataFetchingFlag - ); - /** - * Implement a batch processing mechanism to retrieve URLs for index files - * from directories obtained by scraping the Common Crawl server. - * Process the crawled directories in batches, adding them to the ccFilesPromises array for asynchronous processing. - * Each batch contains a subset of directories from the crawledDirectories array. - * If there are remaining directories after processing a batch, a delay is introduced before processing the next batch. - */ - const ccFilesResults = await processDirectoriesInBatches(crawledDirectories,DIRECTORIES_BATCH_SIZE,DELAY); - /** - * Flattens a 3D array of ccFilesResults into a 1D array using the reduce method. - * The resulting array will contain all the elements from the nested arrays. - * - * @param {Array} ccFilesResults - The 3D array of ccFilesResults to be flattened. - * @returns {Array} - The flattened 1D array of ccFilesResults. - */ - const flattedResult = flattenCCFilesResults(ccFilesResults); - return flattedResult; + let crawledDirectories; + + try { + crawledDirectories = await retrieveDirectoriesUrlsFromCCServer( + URL, + latest + ); + } catch (error) { + throw error; + } + + return await ExponentialBackOff(crawledDirectories); } catch (error) { - throw new Error(error); + throw error; } }, }; diff --git a/src/server/api/drivers/GoogleBigQueryDriver.js b/src/server/api/drivers/GoogleBigQueryDriver.js index 53a0c61..d232afd 100644 --- a/src/server/api/drivers/GoogleBigQueryDriver.js +++ b/src/server/api/drivers/GoogleBigQueryDriver.js @@ -1,5 +1,5 @@ module.exports = { async retrieveDefinitionsFromBigQuery() { return ['Fetching big query dataset...']; - } + }, }; diff --git a/src/server/api/services/DownloadService.js b/src/server/api/services/DownloadService.js index 522e15c..c33091a 100644 --- a/src/server/api/services/DownloadService.js +++ b/src/server/api/services/DownloadService.js @@ -1,4 +1,5 @@ const axios = require('axios'); + module.exports = { /** * Downloads a file from the https://index.commoncrawl.org/ URL using the GET method and stream response type. @@ -8,25 +9,29 @@ module.exports = { */ downloadFile: async function (url) { try { + return await axios({ url, method: 'GET', responseType: 'stream', + onDownloadProgress: function (progressEvent) { const total = progressEvent.total; const downloaded = progressEvent.loaded; - const percent = Math.round((downloaded / total) * 100); process.stdout.clearLine(); process.stdout.cursorTo(0); + process.stdout.write( `Downloading: ${percent}% (${downloaded}/${total} bytes)` ); }, }); + } catch (error) { console.error(error); + throw error; } }, }; diff --git a/src/server/api/utils/CommonCrawlDriverUtil.js b/src/server/api/utils/CommonCrawlDriverUtil.js index 1c79039..da6ad03 100644 --- a/src/server/api/utils/CommonCrawlDriverUtil.js +++ b/src/server/api/utils/CommonCrawlDriverUtil.js @@ -2,51 +2,75 @@ const axios = require('axios'); const cheerio = require('cheerio'); const readline = require('readline'); const zlib = require('zlib'); + const { downloadFile } = require('../services/DownloadService'); module.exports = { + /** + * Retrieves the URLs of index files from a given directory URL. + * + * @param {string} url - The URL of the directory containing index files. + * @returns {Array} An array of index file URLs. + * @throws {Error} If an error occurs during the retrieval process. + */ retrieveIndexFilesUrlsFromDirs: async function (url) { try { const response = await downloadFile(url); const gunzip = zlib.createGunzip(); - const lines = readline.createInterface({ input: response.data.pipe(gunzip) }); + + const lines = readline.createInterface({ + input: response.data.pipe(gunzip), + }); const links = []; for await (const line of lines) { const regex = /\.gz$/; + if (!regex.test(line)) { continue; } + links.push(`https://data.commoncrawl.org/${line}`); } - return links; } catch (error) { - throw new Error(error); + throw error; } }, - retrieveUrlsDirectoriesFromCCServer: async function (url,dataFetchingFlag) { + + /** + * Retrieves URLs of directories from the Common Crawl server based on the provided URL and latest flag. + * + * @param {string} url - The URL of the Common Crawl server. + * @param {boolean} latest - Indicates whether to retrieve the latest directories. + * @returns {Array} An array of directories endpoint. + * @throws {Error} If an error occurs during the retrieval process. + */ + retrieveDirectoriesUrlsFromCCServer: async function (url, latest) { try { const links = []; const { data } = await axios.get(url); const html = data; const $ = await cheerio.load(html); - if(!dataFetchingFlag) { + + if (latest) { const row = $('tbody tr')[0]; const linkTd = $(row).find('td:last-child'); const link = linkTd.find('a').attr('href'); links.push(link); return links; } + $('tbody tr').each((index, row) => { const linkTd = $(row).find('td:last-child'); const link = linkTd.find('a').attr('href'); links.push(link); }); + return links; } catch (error) { - throw new Error(error); + throw error; } - } + }, }; diff --git a/src/server/api/utils/ExponentialBackOff.js b/src/server/api/utils/ExponentialBackOff.js new file mode 100644 index 0000000..a15d882 --- /dev/null +++ b/src/server/api/utils/ExponentialBackOff.js @@ -0,0 +1,56 @@ +const { backOff } = require('exponential-backoff'); +const { retrieveIndexFilesUrlsFromDirs } = require('./CommonCrawlDriverUtil'); + +module.exports = { + /** + * Perform exponential backoff retry for retrieving index file URLs from directories. + * + * @async + * @param {Array} crawledDirectories - The array of directories to retrieve index file URLs from. + * @returns {>} retrieved index file URLs. + * @throws {Error} If an error occurs during the execution. + */ + ExponentialBackOff: async function (crawledDirectories) { + try { + let resolvedInnerResults; + let innerResults; + + const backOffResults = await Promise.all( + crawledDirectories.map(async (r) => { + try { + innerResults = await backOff( + () => retrieveIndexFilesUrlsFromDirs(r), + { + timeMultiple: 2, + maxDelay: 1000, + numOfAttempts: 10, + delayFirstAttempt: false, + jitter: 'none', + + retry: (error, numOfAttempts) => { + console.error(error.message); + console.log('Number of attempt:', numOfAttempts); + return true; + }, + } + ); + + try { + resolvedInnerResults = await Promise.all(innerResults); + } catch (error) { + throw error; + } + + return resolvedInnerResults; + } catch (error) { + throw error; + } + }) + ); + + return backOffResults.flat(); + } catch (error) { + throw error; + } + }, +}; diff --git a/src/server/api/utils/FlattenCCFilesResults.js b/src/server/api/utils/FlattenCCFilesResults.js index adf1cae..9ae7dc5 100644 --- a/src/server/api/utils/FlattenCCFilesResults.js +++ b/src/server/api/utils/FlattenCCFilesResults.js @@ -1,5 +1,11 @@ module.exports = { - flattenCCFilesResults: async function (ccFilesResults) { + /** + * Flattens a 3D array of ccFilesResults into a 1D array. + * + * @param {Array>>} ccFilesResults - The 3D array of ccFilesResults to be flattened. + * @returns {Array} - The flattened 1D array. + */ + flattenCCFilesResults: function (ccFilesResults) { return ccFilesResults.reduce((acc, curr) => acc.concat(...curr), []); }, }; diff --git a/src/server/api/utils/ProcessBatch.js b/src/server/api/utils/ProcessBatch.js index 4b96091..4116ca4 100644 --- a/src/server/api/utils/ProcessBatch.js +++ b/src/server/api/utils/ProcessBatch.js @@ -1,19 +1,38 @@ -const { - retrieveIndexFilesUrlsFromDirs, -} = require('./CommonCrawlDriverUtil'); +const { retrieveIndexFilesUrlsFromDirs } = require('./CommonCrawlDriverUtil'); + module.exports = { + /** + * Processes a batch of directories and retrieves the corresponding index file URLs for each directory. + * + * @param {Array} batch - An array of directories to process in the batch. + * @returns {Array>} A promise that resolves to an array of arrays of index file URLs for each directory. + * @throws {Error} If an error occurs during the processing or retrieval of URLs. + */ processBatch: async function (batch) { try { + let urls; + let batchResults; + const batchPromises = batch.map(async (dir) => { - const urls = await retrieveIndexFilesUrlsFromDirs(dir); + + try { + urls = await retrieveIndexFilesUrlsFromDirs(dir); + } catch (error) { + throw error; + } + return urls; }); - const batchResults = await Promise.all(batchPromises); + try { + batchResults = await Promise.all(batchPromises); + } + catch(error) { + throw error; + } return batchResults; - } - catch(error) { - throw new Error(error); + } catch (error) { + throw error; } }, }; diff --git a/src/server/api/utils/ProcessDirectoriesInBatches.js b/src/server/api/utils/ProcessDirectoriesInBatches.js index 34633f7..6f55b94 100644 --- a/src/server/api/utils/ProcessDirectoriesInBatches.js +++ b/src/server/api/utils/ProcessDirectoriesInBatches.js @@ -1,6 +1,15 @@ const { processBatch } = require('./ProcessBatch'); module.exports = { + /** + * Processes crawled directories in batches and retrieves index file URLs for each batch. + * + * @param {Array} crawledDirectories - An array of crawled directories to process. + * @param {number} DIRECTORIES_BATCH_SIZE - The size of each batch. + * @param {number} DELAY - The delay (in milliseconds) between processing each batch. + * @returns {Array>>} A promise that resolves to an array of arrays of index file URLs for each batch. + * @throws {Error} If an error occurs during the processing or retrieval of URLs. + */ processDirectoriesInBatches: async function ( crawledDirectories, DIRECTORIES_BATCH_SIZE, @@ -8,27 +17,42 @@ module.exports = { ) { try { const ccFilesPromises = []; + for ( let dir = 0; dir < crawledDirectories.length; dir += DIRECTORIES_BATCH_SIZE ) { const remainingFiles = crawledDirectories.length - dir; + const batch = crawledDirectories.slice( dir, dir + Math.min(DIRECTORIES_BATCH_SIZE, remainingFiles) ); - const batchPromise = processBatch(batch); + const batchPromise = await processBatch(batch); ccFilesPromises.push(batchPromise); if (dir + DIRECTORIES_BATCH_SIZE < crawledDirectories.length) { - await new Promise((resolve) => setTimeout(resolve, DELAY)); + + try { + await new Promise((resolve) => setTimeout(resolve, DELAY)); + } catch (error) { + throw error; + } + } } - return await Promise.all(ccFilesPromises); + + try { + return await Promise.all(ccFilesPromises); + } + catch(error) { + throw error; + } + } catch (error) { - throw new Error(error); + throw error; } }, }; diff --git a/src/server/api/utils/SelectDataSources.js b/src/server/api/utils/SelectDataSources.js index 849f493..4b8d840 100644 --- a/src/server/api/utils/SelectDataSources.js +++ b/src/server/api/utils/SelectDataSources.js @@ -5,15 +5,27 @@ const { const { retrieveDefinitionsFromGithub, } = require('../drivers/GithubCrawlerDriver'); + module.exports = { - selectDataSources: async function (dataSource, dataFetchingFlag) { + /** + * Selects and retrieves API definitions based on the specified data source. + * + * @param {string} dataSource - The data source to retrieve API definitions from. + * @param {boolean} latest - Flag indicating whether to retrieve the latest API definitions. + * @returns {>} A promise that resolves to an array of API definitions. + * @throws {Error} If an error occurs during the retrieval process or if an invalid data source is provided. + */ + selectDataSources: async function (dataSource, latest) { switch (dataSource) { case 'commonCrawl': - return await retrieveDefinitionsFromCC(dataFetchingFlag); + return await retrieveDefinitionsFromCC(latest); + case 'github': return await retrieveDefinitionsFromGithub(); + case 'bigQuery': return await retrieveDefinitionsFromBigQuery(); + default: return res.badRequest('Invalid data source'); } diff --git a/src/server/config/routes.js b/src/server/config/routes.js index 73230ce..399e96e 100644 --- a/src/server/config/routes.js +++ b/src/server/config/routes.js @@ -10,15 +10,6 @@ module.exports.routes = { - /** - * payload for a POST route - * - * dataSource: commonCrawl; - * dataSource: bigQuery; - * dataSource: github; - * dataSource: web; - * etc... - */ - 'POST /api/v1/run/crawler': 'CrawlingController.start-crawling' + 'POST /api/v1/run/crawler': 'CrawlingController.startCrawling' }; diff --git a/src/server/package-lock.json b/src/server/package-lock.json index 38b7b92..9cf7ba1 100644 --- a/src/server/package-lock.json +++ b/src/server/package-lock.json @@ -1,5 +1,5 @@ { - "name": "server", + "name": "openapi-web-search", "version": "0.0.0", "lockfileVersion": 1, "requires": true, @@ -1047,6 +1047,11 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" }, + "exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" + }, "express": { "version": "4.17.3", "resolved": "https://registry.npmjs.org/express/-/express-4.17.3.tgz", diff --git a/src/server/package.json b/src/server/package.json index e690f03..0d12161 100644 --- a/src/server/package.json +++ b/src/server/package.json @@ -1,13 +1,28 @@ { - "name": "server", + "name": "openapi-web-search", "private": true, "version": "0.0.0", - "description": "a Sails application", - "keywords": [], + "description": "An open-source tool for discovering Swagger and OpenAPI definitions on the web. It crawls web pages, validates API definitions, and indexes them for an ongoing search. Simplifying API discovery by locating documentation, repositories, and other essential aspects of running an API.", + "keywords": [ + "Open-source", + "Swagger", + "Crawling", + "API-search", + "Common-crawl", + "Web-indexing", + "API-discovery", + "OpenAPI", + "API", + "sails.js", + "ELK-stack", + "elasticsearch", + "kibana" + ], "dependencies": { "@sailshq/lodash": "^3.10.3", "axios": "^1.4.0", "cheerio": "^1.0.0-rc.12", + "exponential-backoff": "^3.1.1", "node-cron": "^3.0.2", "sails": "^1.5.4", "sails-hook-orm": "^4.0.0", @@ -27,10 +42,10 @@ "main": "app.js", "repository": { "type": "git", - "url": "git://github.com/priyanshu/server.git" + "url": "https://github.com/postman-open-technologies/openapi-web-search" }, - "author": "priyanshu", - "license": "", + "author": "Priyanshu Sharma", + "license": "MIT", "engines": { "node": "^14.21" } From ef9181ddc86430dcae75359f2c96613354880f2d Mon Sep 17 00:00:00 2001 From: priyanshu-kun Date: Fri, 30 Jun 2023 21:45:43 +0530 Subject: [PATCH 10/11] Refactor code for improved readability and maintainability --- src/server/api/constants/Constants.js | 6 +- src/server/api/drivers/CommonCrawlDriver.js | 16 ++--- src/server/api/keywords.json | 16 ++++- src/server/api/services/DownloadService.js | 2 +- .../{ParseService.js => ParserService.js} | 0 src/server/api/utils/FlattenCCFilesResults.js | 11 ---- src/server/api/utils/ProcessBatch.js | 38 ------------ .../api/utils/ProcessDirectoriesInBatches.js | 58 ------------------- src/server/api/utils/SelectDataSources.js | 2 +- ...processDirectoriesWithExponentialRetry.js} | 2 +- 10 files changed, 26 insertions(+), 125 deletions(-) rename src/server/api/services/{ParseService.js => ParserService.js} (100%) delete mode 100644 src/server/api/utils/FlattenCCFilesResults.js delete mode 100644 src/server/api/utils/ProcessBatch.js delete mode 100644 src/server/api/utils/ProcessDirectoriesInBatches.js rename src/server/api/utils/{ExponentialBackOff.js => processDirectoriesWithExponentialRetry.js} (95%) diff --git a/src/server/api/constants/Constants.js b/src/server/api/constants/Constants.js index 5163db8..3a1a42c 100644 --- a/src/server/api/constants/Constants.js +++ b/src/server/api/constants/Constants.js @@ -1,6 +1,4 @@ -const URL = 'https://index.commoncrawl.org/'; +const CC_SERVER_URL = 'https://index.commoncrawl.org/'; const SCHEDULE = '0 0 * * 0'; -const DIRECTORIES_BATCH_SIZE = 10; -const DELAY = 1000; -module.exports = { URL, SCHEDULE, DIRECTORIES_BATCH_SIZE, DELAY }; +module.exports = { CC_SERVER_URL, SCHEDULE }; diff --git a/src/server/api/drivers/CommonCrawlDriver.js b/src/server/api/drivers/CommonCrawlDriver.js index c840fc9..15cf306 100644 --- a/src/server/api/drivers/CommonCrawlDriver.js +++ b/src/server/api/drivers/CommonCrawlDriver.js @@ -1,16 +1,10 @@ const { - URL, - DIRECTORIES_BATCH_SIZE, - DELAY, + CC_SERVER_URL } = require('../constants/Constants'); const { retrieveDirectoriesUrlsFromCCServer, } = require('../utils/CommonCrawlDriverUtil'); -const {ExponentialBackOff} = require('../utils/ExponentialBackOff'); -const { flattenCCFilesResults } = require('../utils/FlattenCCFilesResults'); -const { - processDirectoriesInBatches, -} = require('../utils/ProcessDirectoriesInBatches'); +const {processDirectoriesWithExponentialRetry} = require('../utils/processDirectoriesWithExponentialRetry'); module.exports = { /** @@ -29,14 +23,16 @@ module.exports = { try { crawledDirectories = await retrieveDirectoriesUrlsFromCCServer( - URL, + CC_SERVER_URL, latest ); } catch (error) { throw error; } - return await ExponentialBackOff(crawledDirectories); + const indexFiles = await processDirectoriesWithExponentialRetry(crawledDirectories); + + return indexFiles; } catch (error) { throw error; } diff --git a/src/server/api/keywords.json b/src/server/api/keywords.json index 077404a..a83c8ea 100644 --- a/src/server/api/keywords.json +++ b/src/server/api/keywords.json @@ -1,3 +1,17 @@ { - + "definitions": [ + "openapi.json", + "openapi.yaml", + "openapi.yml", + "swagger.json", + "swagger.yaml", + "swagger.yml" + ], + "keywords": [ + "openapi", + "swagger" + ], + "subdomain": [ + "api" + ] } \ No newline at end of file diff --git a/src/server/api/services/DownloadService.js b/src/server/api/services/DownloadService.js index c33091a..9805411 100644 --- a/src/server/api/services/DownloadService.js +++ b/src/server/api/services/DownloadService.js @@ -1,4 +1,4 @@ -const axios = require('axios'); +const axios = require('axios') module.exports = { /** diff --git a/src/server/api/services/ParseService.js b/src/server/api/services/ParserService.js similarity index 100% rename from src/server/api/services/ParseService.js rename to src/server/api/services/ParserService.js diff --git a/src/server/api/utils/FlattenCCFilesResults.js b/src/server/api/utils/FlattenCCFilesResults.js deleted file mode 100644 index 9ae7dc5..0000000 --- a/src/server/api/utils/FlattenCCFilesResults.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - /** - * Flattens a 3D array of ccFilesResults into a 1D array. - * - * @param {Array>>} ccFilesResults - The 3D array of ccFilesResults to be flattened. - * @returns {Array} - The flattened 1D array. - */ - flattenCCFilesResults: function (ccFilesResults) { - return ccFilesResults.reduce((acc, curr) => acc.concat(...curr), []); - }, -}; diff --git a/src/server/api/utils/ProcessBatch.js b/src/server/api/utils/ProcessBatch.js deleted file mode 100644 index 4116ca4..0000000 --- a/src/server/api/utils/ProcessBatch.js +++ /dev/null @@ -1,38 +0,0 @@ -const { retrieveIndexFilesUrlsFromDirs } = require('./CommonCrawlDriverUtil'); - -module.exports = { - /** - * Processes a batch of directories and retrieves the corresponding index file URLs for each directory. - * - * @param {Array} batch - An array of directories to process in the batch. - * @returns {Array>} A promise that resolves to an array of arrays of index file URLs for each directory. - * @throws {Error} If an error occurs during the processing or retrieval of URLs. - */ - processBatch: async function (batch) { - try { - let urls; - let batchResults; - - const batchPromises = batch.map(async (dir) => { - - try { - urls = await retrieveIndexFilesUrlsFromDirs(dir); - } catch (error) { - throw error; - } - - return urls; - }); - - try { - batchResults = await Promise.all(batchPromises); - } - catch(error) { - throw error; - } - return batchResults; - } catch (error) { - throw error; - } - }, -}; diff --git a/src/server/api/utils/ProcessDirectoriesInBatches.js b/src/server/api/utils/ProcessDirectoriesInBatches.js deleted file mode 100644 index 6f55b94..0000000 --- a/src/server/api/utils/ProcessDirectoriesInBatches.js +++ /dev/null @@ -1,58 +0,0 @@ -const { processBatch } = require('./ProcessBatch'); - -module.exports = { - /** - * Processes crawled directories in batches and retrieves index file URLs for each batch. - * - * @param {Array} crawledDirectories - An array of crawled directories to process. - * @param {number} DIRECTORIES_BATCH_SIZE - The size of each batch. - * @param {number} DELAY - The delay (in milliseconds) between processing each batch. - * @returns {Array>>} A promise that resolves to an array of arrays of index file URLs for each batch. - * @throws {Error} If an error occurs during the processing or retrieval of URLs. - */ - processDirectoriesInBatches: async function ( - crawledDirectories, - DIRECTORIES_BATCH_SIZE, - DELAY - ) { - try { - const ccFilesPromises = []; - - for ( - let dir = 0; - dir < crawledDirectories.length; - dir += DIRECTORIES_BATCH_SIZE - ) { - const remainingFiles = crawledDirectories.length - dir; - - const batch = crawledDirectories.slice( - dir, - dir + Math.min(DIRECTORIES_BATCH_SIZE, remainingFiles) - ); - - const batchPromise = await processBatch(batch); - ccFilesPromises.push(batchPromise); - - if (dir + DIRECTORIES_BATCH_SIZE < crawledDirectories.length) { - - try { - await new Promise((resolve) => setTimeout(resolve, DELAY)); - } catch (error) { - throw error; - } - - } - } - - try { - return await Promise.all(ccFilesPromises); - } - catch(error) { - throw error; - } - - } catch (error) { - throw error; - } - }, -}; diff --git a/src/server/api/utils/SelectDataSources.js b/src/server/api/utils/SelectDataSources.js index 4b8d840..73f4050 100644 --- a/src/server/api/utils/SelectDataSources.js +++ b/src/server/api/utils/SelectDataSources.js @@ -27,7 +27,7 @@ module.exports = { return await retrieveDefinitionsFromBigQuery(); default: - return res.badRequest('Invalid data source'); + return res.badRequest('Invalid data source.'); } }, }; diff --git a/src/server/api/utils/ExponentialBackOff.js b/src/server/api/utils/processDirectoriesWithExponentialRetry.js similarity index 95% rename from src/server/api/utils/ExponentialBackOff.js rename to src/server/api/utils/processDirectoriesWithExponentialRetry.js index a15d882..19441a7 100644 --- a/src/server/api/utils/ExponentialBackOff.js +++ b/src/server/api/utils/processDirectoriesWithExponentialRetry.js @@ -10,7 +10,7 @@ module.exports = { * @returns {>} retrieved index file URLs. * @throws {Error} If an error occurs during the execution. */ - ExponentialBackOff: async function (crawledDirectories) { + processDirectoriesWithExponentialRetry: async function (crawledDirectories) { try { let resolvedInnerResults; let innerResults; From 5427bd8530e68a1de0d4cf3c4befcbbc3bf52def Mon Sep 17 00:00:00 2001 From: priyanshu-kun Date: Sun, 9 Jul 2023 17:24:27 +0530 Subject: [PATCH 11/11] Implementing Queue-Based Architecture of Downloading Index Files from Common Crawl Server Using RabbitMQ NOTE: All code is contained within the downloadAndProcessIndexFilesInBackground() function. --- src/server/api/constants/Constants.js | 5 +- .../api/controllers/CrawlingController.js | 13 +-- .../DownloadAndProcessIndexFilesController.js | 48 +++++++++++ src/server/api/drivers/CommonCrawlDriver.js | 30 +++++-- src/server/api/services/DownloadService.js | 5 +- src/server/api/utils/CommonCrawlDriverUtil.js | 20 ++++- src/server/api/utils/ConnectRabbitMQ.js | 34 ++++++++ .../api/utils/DownloadAndProcessIndexFiles.js | 20 +++++ src/server/api/utils/EmptyQueue.js | 43 ++++++++++ ....js => ProcessDataWithExponentialRetry.js} | 2 +- src/server/api/utils/ProcessJob.js | 34 ++++++++ .../api/utils/RemoveFileAfterProcessing.js | 13 +++ src/server/api/utils/SaveFileForProcessing.js | 18 +++++ src/server/api/utils/SelectDataSources.js | 21 ++++- .../api/workers/DownloadAndProcessWorker.js | 48 +++++++++++ src/server/config/bootstrap.js | 37 +++++---- src/server/config/routes.js | 3 +- src/server/package-lock.json | 81 +++++++++++++++++++ src/server/package.json | 1 + 19 files changed, 433 insertions(+), 43 deletions(-) create mode 100644 src/server/api/controllers/DownloadAndProcessIndexFilesController.js create mode 100644 src/server/api/utils/ConnectRabbitMQ.js create mode 100644 src/server/api/utils/DownloadAndProcessIndexFiles.js create mode 100644 src/server/api/utils/EmptyQueue.js rename src/server/api/utils/{processDirectoriesWithExponentialRetry.js => ProcessDataWithExponentialRetry.js} (95%) create mode 100644 src/server/api/utils/ProcessJob.js create mode 100644 src/server/api/utils/RemoveFileAfterProcessing.js create mode 100644 src/server/api/utils/SaveFileForProcessing.js create mode 100644 src/server/api/workers/DownloadAndProcessWorker.js diff --git a/src/server/api/constants/Constants.js b/src/server/api/constants/Constants.js index 3a1a42c..343f1c7 100644 --- a/src/server/api/constants/Constants.js +++ b/src/server/api/constants/Constants.js @@ -1,4 +1,7 @@ const CC_SERVER_URL = 'https://index.commoncrawl.org/'; const SCHEDULE = '0 0 * * 0'; +const RABBITMQ_URL = 'amqp://localhost:5672'; +const QUEUE_NAME = 'background-jobs'; +const FILE_PATH = `${__dirname}/../../data/output.txt`; -module.exports = { CC_SERVER_URL, SCHEDULE }; +module.exports = { CC_SERVER_URL, SCHEDULE, RABBITMQ_URL, QUEUE_NAME, FILE_PATH }; diff --git a/src/server/api/controllers/CrawlingController.js b/src/server/api/controllers/CrawlingController.js index 0f89a16..899c7ee 100644 --- a/src/server/api/controllers/CrawlingController.js +++ b/src/server/api/controllers/CrawlingController.js @@ -35,31 +35,26 @@ module.exports = { * ... * ] */ - 'startCrawling': async function (req, res) { + startCrawling: async function (req, res) { try { const { dataSource } = req.body; /** * If req.query.latest is truthy and equals the string 'true', then latest is set to true; else latest is set to false; * otherwise, it is set to the default value true. */ - const latest = req.query.latest ? req.query.latest === 'true': true; - let apiDefinitions; + const latest = req.query.latest ? req.query.latest === 'true' : true; if (!dataSource) { return res.badRequest('Data source not provided'); } try { - apiDefinitions = await selectDataSources(dataSource, latest); + await selectDataSources(dataSource, latest); } catch (error) { throw error; } - if (!apiDefinitions || apiDefinitions.length === 0) { - return res.notFound('No API definitions found'); - } - - return res.json(apiDefinitions); + return res.status(202).json({message: 'downloading and processing has begun.'}); } catch (error) { return res.serverError(error); } diff --git a/src/server/api/controllers/DownloadAndProcessIndexFilesController.js b/src/server/api/controllers/DownloadAndProcessIndexFilesController.js new file mode 100644 index 0000000..3882c27 --- /dev/null +++ b/src/server/api/controllers/DownloadAndProcessIndexFilesController.js @@ -0,0 +1,48 @@ +const { connectRabbitMQ } = require('../utils/ConnectRabbitMQ'); +const { emptyQueue } = require('../utils/EmptyQueue'); + +module.exports = { + startDownloadAndProcessIndexFiles: async function (req, res) { + try { + let Channel; + let queueName; + let Connection; + const { indexFiles: indexFileUrls } = req.body; + + try { + await emptyQueue(); + } catch (error) { + throw error; + } + + try { + const { channel, QUEUE_NAME, connection } = await connectRabbitMQ(); + Channel = channel; + queueName = QUEUE_NAME; + Connection = connection; + } catch (error) { + throw error; + } + + for (const url of indexFileUrls) { + const message = JSON.stringify({ url }); + Channel.sendToQueue(queueName, Buffer.from(message)); + } + + try { + await Channel.close(); + } catch (error) { + throw error; + } + + try { + await Connection.close(); + } catch (error) { + throw error; + } + return res.ok('ok!'); + } catch (error) { + return res.serverError(error); + } + }, +}; diff --git a/src/server/api/drivers/CommonCrawlDriver.js b/src/server/api/drivers/CommonCrawlDriver.js index 15cf306..aab9837 100644 --- a/src/server/api/drivers/CommonCrawlDriver.js +++ b/src/server/api/drivers/CommonCrawlDriver.js @@ -1,10 +1,13 @@ -const { - CC_SERVER_URL -} = require('../constants/Constants'); +const { CC_SERVER_URL } = require('../constants/Constants'); const { retrieveDirectoriesUrlsFromCCServer, } = require('../utils/CommonCrawlDriverUtil'); -const {processDirectoriesWithExponentialRetry} = require('../utils/processDirectoriesWithExponentialRetry'); +const { + processDataWithExponentialRetry, +} = require('../utils/ProcessDataWithExponentialRetry'); +const { + downloadAndProcessIndexFilesInBackground, +} = require('../utils/DownloadAndProcessIndexFiles'); module.exports = { /** @@ -20,6 +23,7 @@ module.exports = { retrieveDefinitionsFromCC: async function (latest) { try { let crawledDirectories; + let indexFiles; try { crawledDirectories = await retrieveDirectoriesUrlsFromCCServer( @@ -30,9 +34,23 @@ module.exports = { throw error; } - const indexFiles = await processDirectoriesWithExponentialRetry(crawledDirectories); + try { + indexFiles = await processDataWithExponentialRetry(crawledDirectories); + } catch (error) { + throw error; + } - return indexFiles; + try { + // Right now, there are two main problem with that function, First is I cannot able use parallel processing functionality using nodejs clusters because of that I cannot able to maximize the utilization of nodejs. And second one is How? I have got 503 error from CC server it is not reproducible, I have got that randomly. + /** + * TODO'S + * [] Implement parallel processing using clusters. + * [] Fix 503 error + */ + await downloadAndProcessIndexFilesInBackground(indexFiles); + } catch (error) { + throw error; + } } catch (error) { throw error; } diff --git a/src/server/api/services/DownloadService.js b/src/server/api/services/DownloadService.js index 9805411..5287de4 100644 --- a/src/server/api/services/DownloadService.js +++ b/src/server/api/services/DownloadService.js @@ -1,4 +1,4 @@ -const axios = require('axios') +const axios = require('axios'); module.exports = { /** @@ -9,7 +9,6 @@ module.exports = { */ downloadFile: async function (url) { try { - return await axios({ url, method: 'GET', @@ -26,9 +25,9 @@ module.exports = { process.stdout.write( `Downloading: ${percent}% (${downloaded}/${total} bytes)` ); + }, }); - } catch (error) { console.error(error); throw error; diff --git a/src/server/api/utils/CommonCrawlDriverUtil.js b/src/server/api/utils/CommonCrawlDriverUtil.js index da6ad03..40b1a93 100644 --- a/src/server/api/utils/CommonCrawlDriverUtil.js +++ b/src/server/api/utils/CommonCrawlDriverUtil.js @@ -50,9 +50,23 @@ module.exports = { retrieveDirectoriesUrlsFromCCServer: async function (url, latest) { try { const links = []; - const { data } = await axios.get(url); - const html = data; - const $ = await cheerio.load(html); + let Data; + let $; + + try { + const { data } = await axios.get(url); + Data = data; + } catch (error) { + throw error; + } + + const html = Data; + + try { + $ = await cheerio.load(html); + } catch (error) { + throw error; + } if (latest) { const row = $('tbody tr')[0]; diff --git a/src/server/api/utils/ConnectRabbitMQ.js b/src/server/api/utils/ConnectRabbitMQ.js new file mode 100644 index 0000000..6ecc8e3 --- /dev/null +++ b/src/server/api/utils/ConnectRabbitMQ.js @@ -0,0 +1,34 @@ +const amqp = require('amqplib'); + +const { QUEUE_NAME, RABBITMQ_URL } = require('../constants/Constants'); + +module.exports = { + connectRabbitMQ: async function () { + try { + let connection; + let channel; + + try { + connection = await amqp.connect(RABBITMQ_URL); + } catch (error) { + throw error; + } + + try { + channel = await connection.createChannel(); + } catch (error) { + throw error; + } + + try { + await channel.assertQueue(QUEUE_NAME); + } catch (error) { + throw error; + } + + return { channel, QUEUE_NAME, connection }; + } catch (error) { + throw error; + } + }, +}; diff --git a/src/server/api/utils/DownloadAndProcessIndexFiles.js b/src/server/api/utils/DownloadAndProcessIndexFiles.js new file mode 100644 index 0000000..1f3db37 --- /dev/null +++ b/src/server/api/utils/DownloadAndProcessIndexFiles.js @@ -0,0 +1,20 @@ +const axios = require('axios'); +const { startWorker } = require('../workers/DownloadAndProcessWorker'); + +module.exports = { + downloadAndProcessIndexFilesInBackground: async function (indexFiles) { + try { + await axios({ + url: 'http://localhost:1337/api/v1/download/process/index-files', + method: 'POST', + data: { + indexFiles, + }, + }); + + startWorker(); + } catch (error) { + throw error; + } + }, +}; diff --git a/src/server/api/utils/EmptyQueue.js b/src/server/api/utils/EmptyQueue.js new file mode 100644 index 0000000..bc6bd6a --- /dev/null +++ b/src/server/api/utils/EmptyQueue.js @@ -0,0 +1,43 @@ +const { connectRabbitMQ } = require('./ConnectRabbitMQ'); + +module.exports = { + emptyQueue: async function () { + try { + let Channel; + let queueName; + let Connection; + + try { + const { channel, QUEUE_NAME, connection } = await connectRabbitMQ(); + Channel = channel; + queueName = QUEUE_NAME; + Connection = connection; + } + catch(error) { + throw error; + } + + try { + await Channel.deleteQueue(queueName); + } catch(error) { + throw error; + } + + console.log('\n\nQueue emptied.\n'); + + try { + await Channel.close(); + } catch (error) { + throw error; + } + + try { + await Connection.close(); + } catch (error) { + throw error; + } + } catch (error) { + throw error; + } + }, +}; diff --git a/src/server/api/utils/processDirectoriesWithExponentialRetry.js b/src/server/api/utils/ProcessDataWithExponentialRetry.js similarity index 95% rename from src/server/api/utils/processDirectoriesWithExponentialRetry.js rename to src/server/api/utils/ProcessDataWithExponentialRetry.js index 19441a7..f9b3cb6 100644 --- a/src/server/api/utils/processDirectoriesWithExponentialRetry.js +++ b/src/server/api/utils/ProcessDataWithExponentialRetry.js @@ -10,7 +10,7 @@ module.exports = { * @returns {>} retrieved index file URLs. * @throws {Error} If an error occurs during the execution. */ - processDirectoriesWithExponentialRetry: async function (crawledDirectories) { + processDataWithExponentialRetry: async function (crawledDirectories) { try { let resolvedInnerResults; let innerResults; diff --git a/src/server/api/utils/ProcessJob.js b/src/server/api/utils/ProcessJob.js new file mode 100644 index 0000000..e7bee9c --- /dev/null +++ b/src/server/api/utils/ProcessJob.js @@ -0,0 +1,34 @@ +const { downloadFile } = require('../services/DownloadService'); +const { removeFileAfterProcessing } = require('./RemoveFileAfterProcessing'); +const { saveFileForProcessing } = require('./SaveFileForProcessing'); + +module.exports = { + processJob: async function (job) { + try { + const { url } = job; + + const response = await downloadFile(url); + + try { + await saveFileForProcessing(response); + } catch(error) { + throw error; + } + + // parsing and validating code maybe, will write here... + + + + // removing the file in order to process next file + try { + await removeFileAfterProcessing(); + } catch(error) { + throw error; + } + + + } catch (error) { + throw error; + } + }, +}; diff --git a/src/server/api/utils/RemoveFileAfterProcessing.js b/src/server/api/utils/RemoveFileAfterProcessing.js new file mode 100644 index 0000000..98d4cd5 --- /dev/null +++ b/src/server/api/utils/RemoveFileAfterProcessing.js @@ -0,0 +1,13 @@ +const fs = require('fs'); +const { FILE_PATH } = require('../constants/Constants'); + +module.exports = { + removeFileAfterProcessing: function () { + fs.unlink(FILE_PATH, (error) => { + if (error) { + throw error; + } + console.log('File deleted!'); + }); + }, +}; diff --git a/src/server/api/utils/SaveFileForProcessing.js b/src/server/api/utils/SaveFileForProcessing.js new file mode 100644 index 0000000..c7a2043 --- /dev/null +++ b/src/server/api/utils/SaveFileForProcessing.js @@ -0,0 +1,18 @@ +const fs = require('fs'); +const zlib = require('zlib'); +const { FILE_PATH } = require('../constants/Constants'); + +module.exports = { + saveFileForProcessing: function (response) { + const writer = fs.createWriteStream(FILE_PATH); + response.data.pipe(zlib.createGunzip()).pipe(writer); + + return new Promise((resolve, reject) => { + writer.on('finish', () => { + resolve(); + }); + + writer.on('error', reject); + }); + }, +}; diff --git a/src/server/api/utils/SelectDataSources.js b/src/server/api/utils/SelectDataSources.js index 73f4050..e8c22a2 100644 --- a/src/server/api/utils/SelectDataSources.js +++ b/src/server/api/utils/SelectDataSources.js @@ -18,13 +18,28 @@ module.exports = { selectDataSources: async function (dataSource, latest) { switch (dataSource) { case 'commonCrawl': - return await retrieveDefinitionsFromCC(latest); + try { + return await retrieveDefinitionsFromCC(latest); + } + catch(error) { + throw error; + } case 'github': - return await retrieveDefinitionsFromGithub(); + try { + return await retrieveDefinitionsFromGithub(); + } + catch(error) { + throw error; + } case 'bigQuery': - return await retrieveDefinitionsFromBigQuery(); + try { + return await retrieveDefinitionsFromBigQuery(); + } + catch(error) { + throw error; + } default: return res.badRequest('Invalid data source.'); diff --git a/src/server/api/workers/DownloadAndProcessWorker.js b/src/server/api/workers/DownloadAndProcessWorker.js new file mode 100644 index 0000000..1435b38 --- /dev/null +++ b/src/server/api/workers/DownloadAndProcessWorker.js @@ -0,0 +1,48 @@ +const { connectRabbitMQ } = require('../utils/ConnectRabbitMQ'); +const { processJob } = require('../utils/ProcessJob'); + +module.exports = { + startWorker: async function () { + try { + let Channel; + let queueName; + + try { + const { channel, QUEUE_NAME, connection } = await connectRabbitMQ(); + Channel = channel; + queueName = QUEUE_NAME; + Connection = connection; + } catch (error) { + throw error; + } + + let isProcessing = false; + + Channel.consume(queueName, async (message) => { + if (!message || isProcessing) { + // Check if message is null or if another job is already being processed + if (message) { + Channel.reject(message, true); + } + return; + } + + const job = JSON.parse(message.content.toString()); + + isProcessing = true; + + try { + await processJob(job); + Channel.ack(message); + } catch (error) { + console.error('An error occurred:', error); + Channel.reject(message, true); + } finally { + isProcessing = false; + } + }); + } catch (error) { + throw error; + } + }, +}; diff --git a/src/server/config/bootstrap.js b/src/server/config/bootstrap.js index fb1c17f..2d2ba4b 100644 --- a/src/server/config/bootstrap.js +++ b/src/server/config/bootstrap.js @@ -1,3 +1,4 @@ +const childProcess = require('child_process'); /** * Seed Function * (sails.config.bootstrap) @@ -9,22 +10,26 @@ * https://sailsjs.com/config/bootstrap */ -module.exports.bootstrap = async function() { +module.exports.bootstrap = async function () { + // Spawn the worker.js script as a child process + const workerProcess = childProcess.fork( + `${__dirname}/../api/workers/DownloadAndProcessWorker.js` + ); - // By convention, this is a good place to set up fake data during development. - // - // For example: - // ``` - // // Set up fake development data (or if we already have some, avast) - // if (await User.count() > 0) { - // return; - // } - // - // await User.createEach([ - // { emailAddress: 'ry@example.com', fullName: 'Ryan Dahl', }, - // { emailAddress: 'rachael@example.com', fullName: 'Rachael Shaw', }, - // // etc. - // ]); - // ``` + // Handle any errors from the worker process + workerProcess.on('error', (error) => { + console.error('Worker process error:', error); + }); + // Handle the exit of the worker process + workerProcess.on('exit', (code) => { + console.log('Worker process exited with code:', code); + }); + + // Handle a graceful shutdown of the worker process on Sails.js app termination + process.on('SIGINT', () => { + console.log('Terminating worker process...'); + workerProcess.kill('SIGINT'); + process.exit(); + }); }; diff --git a/src/server/config/routes.js b/src/server/config/routes.js index 399e96e..a52533b 100644 --- a/src/server/config/routes.js +++ b/src/server/config/routes.js @@ -10,6 +10,7 @@ module.exports.routes = { - 'POST /api/v1/run/crawler': 'CrawlingController.startCrawling' + 'POST /api/v1/run/crawler': 'CrawlingController.startCrawling', + 'POST /api/v1/download/process/index-files': 'DownloadAndProcessIndexFilesController.startDownloadAndProcessIndexFiles' }; diff --git a/src/server/package-lock.json b/src/server/package-lock.json index 9cf7ba1..b91fa0f 100644 --- a/src/server/package-lock.json +++ b/src/server/package-lock.json @@ -4,6 +4,36 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@acuminous/bitsyntax": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@acuminous/bitsyntax/-/bitsyntax-0.1.2.tgz", + "integrity": "sha512-29lUK80d1muEQqiUsSo+3A0yP6CdspgC95EnKBMi22Xlwt79i/En4Vr67+cXhU+cZjbti3TgGGC5wy1stIywVQ==", + "requires": { + "buffer-more-ints": "~1.0.0", + "debug": "^4.3.4", + "safe-buffer": "~5.1.2" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "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==" + } + } + }, "@babel/code-frame": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", @@ -106,6 +136,17 @@ "uri-js": "^4.2.2" } }, + "amqplib": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.10.3.tgz", + "integrity": "sha512-UHmuSa7n8vVW/a5HGh2nFPqAEr8+cD4dEZ6u9GjP91nHfr1a54RyAKyra7Sb5NH7NBKOUlyQSMXIp0qAixKexw==", + "requires": { + "@acuminous/bitsyntax": "^0.1.2", + "buffer-more-ints": "~1.0.0", + "readable-stream": "1.x >=1.1.9", + "url-parse": "~1.5.10" + } + }, "anchor": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/anchor/-/anchor-1.4.1.tgz", @@ -311,6 +352,11 @@ "fill-range": "^7.0.1" } }, + "buffer-more-ints": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-1.0.0.tgz", + "integrity": "sha512-EMetuGFz5SLsT0QTnXzINh4Ksr+oo4i+UGTXEshiGCQWnsgSs7ZhJ8fzlwQ+OzEMs0MpDAMr1hxnblp5a4vcHg==" + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -589,6 +635,11 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.1.0.tgz", "integrity": "sha512-Alvs19Vgq07eunykd3Xy2jF0/qSNv2u7KDbAek9H5liV1UMijbqFs5cycZvv5dVsvseT/U4H8/7/w8Koh35C4A==" }, + "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==" + }, "cross-spawn": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", @@ -2399,6 +2450,11 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==" }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, "random-bytes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", @@ -2473,6 +2529,17 @@ "mute-stream": "~0.0.4" } }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -2526,6 +2593,11 @@ "switchback": "^2.0.1" } }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -3421,6 +3493,15 @@ "punycode": "^2.1.0" } }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", diff --git a/src/server/package.json b/src/server/package.json index 0d12161..c9970dc 100644 --- a/src/server/package.json +++ b/src/server/package.json @@ -20,6 +20,7 @@ ], "dependencies": { "@sailshq/lodash": "^3.10.3", + "amqplib": "^0.10.3", "axios": "^1.4.0", "cheerio": "^1.0.0-rc.12", "exponential-backoff": "^3.1.1",