From f44e9080e517f6cefcf25f1f525e3f0e8397d105 Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 16 Feb 2021 00:02:44 +0000 Subject: [PATCH] Start making Start on the basic structure, database stuff --- .gitignore | 1 + README.md | 3 + example.env | 1 + overrides/main.html | 16 +- package.json | 53 ++- pnpm-lock.yaml | 945 ++++++++++++++++++---------------------- src/index.js | 75 +++- src/modules/database.js | 71 +++ src/utils/fs.js | 5 + user/config.js | 3 - user/example.config.js | 3 - user/plugins/.gitkeep | 0 12 files changed, 617 insertions(+), 559 deletions(-) create mode 100644 src/modules/database.js create mode 100644 src/utils/fs.js create mode 100644 user/plugins/.gitkeep diff --git a/.gitignore b/.gitignore index 073fe01..6c80c60 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ site/ # files .env user/config.js +user/database.sqlite *.code-workspace diff --git a/README.md b/README.md index 7e0f003..e20aba7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # Please download from [releases](https://github.com/eartharoid/DiscordTickets/releases) or [v2 branch](https://github.com/eartharoid/DiscordTickets/tree/v2) - master branch is currently a work in progress + +https://discord.com/oauth2/authorize?permissions=8&scope=applications.commands%20bot&client_id=... + # DiscordTickets [![Run on Repl.it](https://repl.it/badge/github/eartharoid/DiscordTickets)](https://repl.it/github/eartharoid/DiscordTickets) [![GitHub issues](https://img.shields.io/github/issues/eartharoid/DiscordTickets?style=flat-square)](https://github.com/eartharoid/DiscordTickets/issues) [![GitHub stars](https://img.shields.io/github/stars/eartharoid/DiscordTickets?style=flat-square)](https://github.com/eartharoid/DiscordTickets/stargazers) [![GitHub forks](https://img.shields.io/github/forks/eartharoid/DiscordTickets?style=flat-square)](https://github.com/eartharoid/DiscordTickets/network) [![GitHub license](https://img.shields.io/github/license/eartharoid/DiscordTickets?style=flat-square)](https://github.com/eartharoid/DiscordTickets/blob/master/LICENSE) ![Codacy grade](https://img.shields.io/codacy/grade/14e6851c85444424b75b8bc3f93e93db?logo=codacy&style=flat-square) [![Discord support server](https://discordapp.com/api/guilds/451745464480432129/embed.png?style=shield)](https://discord.gg/pXc9vyC) diff --git a/example.env b/example.env index 08407e0..a341eef 100644 --- a/example.env +++ b/example.env @@ -1,5 +1,6 @@ DISCORD_TOKEN= +DB_TYPE=sqlite DB_HOST= DB_NAME= DB_USER= diff --git a/overrides/main.html b/overrides/main.html index 674c9d8..77f9cc4 100644 --- a/overrides/main.html +++ b/overrides/main.html @@ -1,2 +1,16 @@ {% extends "base.html" %} -{% block announce %}{% include "announce.html" ignore missing %}{% endblock %} \ No newline at end of file +{% block announce %}{% include "announce.html" ignore missing %}{% endblock %} + +{% block content %} + {{ super() }} + +{% endblock %} \ No newline at end of file diff --git a/package.json b/package.json index 47f093a..3346ebd 100644 --- a/package.json +++ b/package.json @@ -4,31 +4,6 @@ "private": true, "description": "An open-source & self-hosted Discord bot for ticket management.", "main": "src/index.js", - "dependencies": { - "@eartharoid/dtf": "^1.0.8", - "boxen": "^5.0.0", - "discord.js": "^12.5.1", - "dotenv": "^8.2.0", - "leekslazylogger": "^2.0.7", - "n-readlines": "^1.0.1", - "node-fetch": "^2.6.1", - "sequelize": "^6.5.0", - "terminal-link": "^2.1.1", - "to-time-monthsfork": "^1.1.3" - }, - "optionalDependencies": { - "sqlite3": "^5.0.0" - }, - "peerDependencies": { - "mysql2": "2.x", - "mariadb": "2.x", - "pg": "8.x", - "tedious": "11.x" - }, - "devDependencies": { - "eslint": "^7.19.0", - "nodemon": "^2.0.7" - }, "scripts": { "start": "node src/", "test": "echo \"Nothing to test! Run with 'npm start'\" && exit 1" @@ -50,6 +25,30 @@ "bugs": { "url": "https://github.com/eartharoid/DiscordTickets/issues" }, - "homepage": "https://github.com/eartharoid/DiscordTickets/#readme", - "funding": "https://github.com/eartharoid/DiscordTickets/?sponsor=1" + "homepage": "https://discordtickets.eartharoid.me", + "funding": "https://github.com/eartharoid/DiscordTickets/?sponsor=1", + "dependencies": { + "@eartharoid/i18n": "^0.0.1", + "discord.js": "^12.5.1", + "dotenv": "^8.2.0", + "keyv": "^4.0.3", + "leekslazylogger": "^2.0.7", + "node-fetch": "^2.6.1", + "terminal-link": "^2.1.1" + }, + "optionalDependencies": { + "@keyv/sqlite": "^2.0.2" + }, + "peerDependencies": { + "@keyv/mongo": "^1.1.0", + "@keyv/mysql": "^1.1.4", + "@keyv/postgres": "^1.0.16" + }, + "devDependencies": { + "@keyv/mongo": "^1.1.0", + "@keyv/mysql": "^1.1.4", + "@keyv/postgres": "^1.0.16", + "eslint": "^7.20.0", + "nodemon": "^2.0.7" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7295c24..d765ddd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,20 +1,20 @@ dependencies: - '@eartharoid/dtf': 1.0.8 - boxen: 5.0.0 + '@eartharoid/i18n': 0.0.1 discord.js: 12.5.1 dotenv: 8.2.0 + keyv: 4.0.3 leekslazylogger: 2.0.7 - n-readlines: 1.0.1 node-fetch: 2.6.1 - sequelize: 6.5.0_sqlite3@5.0.1 terminal-link: 2.1.1 - to-time-monthsfork: 1.1.4 devDependencies: + '@keyv/mongo': 1.1.0 + '@keyv/mysql': 1.1.4 + '@keyv/postgres': 1.0.16 eslint: 7.20.0 nodemon: 2.0.7 lockfileVersion: 5.2 optionalDependencies: - sqlite3: 5.0.1 + '@keyv/sqlite': 2.0.2 packages: /@babel/code-frame/7.12.11: dependencies: @@ -52,6 +52,10 @@ packages: dev: false resolution: integrity: sha512-e3mR8JY6Uuy1Zj89iYEZfvK6s81GlWEPP4gO8NzfItzF4xFGFTVTwRjZ6sCVBmbhj3ouX2pyvx8O9snx4r5Xrg== + /@eartharoid/i18n/0.0.1: + dev: false + resolution: + integrity: sha512-RXm2+aRBAa2cqp/UEPtlO1AkEJlv5/bANvuPNKA4MSp/UNRKgsJ2tRQt7YintINtgp1ZmaJMH8pxcaLUzwfKUw== /@eslint/eslintrc/0.3.0: dependencies: ajv: 6.12.6 @@ -69,6 +73,41 @@ packages: node: ^10.12.0 || >=12.0.0 resolution: integrity: sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg== + /@keyv/mongo/1.1.0: + dependencies: + mongojs: 2.5.0 + pify: 3.0.0 + dev: true + resolution: + integrity: sha512-SoILHI5E4TEZOE52UatgkpYBLxkSInvfVD0VMtgdsGFiotDckgV3d+QEHc+0arLhZV8gvUWrXxXQsKhZbEBnSg== + /@keyv/mysql/1.1.4: + dependencies: + '@keyv/sql': 1.1.2 + mysql2: 1.5.2 + dev: true + resolution: + integrity: sha512-eFR75GiB+lS/I9+w18382Tg5mXhLme6jICR7f57zP2WVFrGshnq05a4inAO4dz9riyvw99w78aSL7YPIRjCIvA== + /@keyv/postgres/1.0.16: + dependencies: + '@keyv/sql': 1.1.2 + pg: 7.4.1 + dev: true + resolution: + integrity: sha512-gmradhx47OwpZtcHcsEgQoOcTS562f7XjBCacVNaFQqeSeKymeV5UAOiwQIYREo7oOSB9WPGMc/1YV+lnMDemA== + /@keyv/sql/1.1.2: + dependencies: + sql: 0.78.0 + resolution: + integrity: sha1-HdhKXFrSOE34k08N3+IKuB3Cp10= + /@keyv/sqlite/2.0.2: + dependencies: + '@keyv/sql': 1.1.2 + pify: 3.0.0 + sqlite3: 4.2.0 + dev: false + optional: true + resolution: + integrity: sha512-vVaAOK/oCNCzNyB8AjiozAuJ0MqXt9uLsJ0oyQIEEdVw61HHOFiyjdYOGVkxHkgXDoJGF7g6T5ekh5JpdYFz5w== /@sindresorhus/is/0.14.0: dev: true engines: @@ -83,10 +122,6 @@ packages: node: '>=6' resolution: integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== - /@types/node/14.14.28: - dev: false - resolution: - integrity: sha512-lg55ArB+ZiHHbBBttLpzD07akz0QPrZgUODNakeC09i62dnrywr9mFErHuaPlB6I7z+sEbK+IYmplahvplCj2g== /abbrev/1.1.1: resolution: integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== @@ -119,6 +154,7 @@ packages: fast-json-stable-stringify: 2.1.0 json-schema-traverse: 0.4.1 uri-js: 4.4.1 + dev: true resolution: integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== /ajv/7.1.0: @@ -133,6 +169,7 @@ packages: /ansi-align/3.0.0: dependencies: string-width: 3.1.0 + dev: true resolution: integrity: sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw== /ansi-colors/4.1.1: @@ -157,11 +194,13 @@ packages: resolution: integrity: sha1-w7M6te42DYbg5ijwRorn7yfWVN8= /ansi-regex/4.1.0: + dev: true engines: node: '>=6' resolution: integrity: sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== /ansi-regex/5.0.0: + dev: true engines: node: '>=8' resolution: @@ -177,14 +216,15 @@ packages: /ansi-styles/4.3.0: dependencies: color-convert: 2.0.1 + dev: true engines: node: '>=8' resolution: integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - /any-promise/1.3.0: - dev: false + /ansicolors/0.2.1: + dev: true resolution: - integrity: sha1-q8av7tzqUugJzcA3au0845Y10X8= + integrity: sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8= /anymatch/3.1.1: dependencies: normalize-path: 3.0.0 @@ -213,20 +253,6 @@ packages: dev: true resolution: integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - /asn1/0.2.4: - dependencies: - safer-buffer: 2.1.2 - dev: false - optional: true - resolution: - integrity: sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - /assert-plus/1.0.0: - dev: false - engines: - node: '>=0.8' - optional: true - resolution: - integrity: sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= /astral-regex/2.0.0: dev: true engines: @@ -237,45 +263,15 @@ packages: dev: false resolution: integrity: sha1-x57Zf380y48robyXkLzDZkdLS3k= - /aws-sign2/0.7.0: - dev: false - optional: true - resolution: - integrity: sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - /aws4/1.11.0: - dev: false - optional: true - resolution: - integrity: sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== /balanced-match/1.0.0: resolution: integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - /bcrypt-pbkdf/1.0.2: - dependencies: - tweetnacl: 0.14.5 - dev: false - optional: true - resolution: - integrity: sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - /bignumber.js/2.4.0: - dev: false - resolution: - integrity: sha1-g4qZLan51zfg9LLbC+YrsJ3Qxeg= /binary-extensions/2.2.0: dev: true engines: node: '>=8' resolution: integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - /block-stream/0.0.9: - dependencies: - inherits: 2.0.4 - dev: false - engines: - node: 0.4 || >=0.5.8 - optional: true - resolution: - integrity: sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo= /boxen/4.2.0: dependencies: ansi-align: 3.0.0 @@ -291,21 +287,6 @@ packages: node: '>=8' resolution: integrity: sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ== - /boxen/5.0.0: - dependencies: - ansi-align: 3.0.0 - camelcase: 6.2.0 - chalk: 4.1.0 - cli-boxes: 2.2.1 - string-width: 4.2.0 - type-fest: 0.20.2 - widest-line: 3.1.0 - wrap-ansi: 7.0.0 - dev: false - engines: - node: '>=10' - resolution: - integrity: sha512-5bvsqw+hhgUi3oYGK0Vf4WpIkyemp60WBInn7+WNfoISzAqk/HX4L7WNROq38E6UR/y3YADpv6pEm4BfkeEAdA== /brace-expansion/1.1.11: dependencies: balanced-match: 1.0.0 @@ -320,6 +301,21 @@ packages: node: '>=8' resolution: integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + /bson/1.0.9: + deprecated: Fixed a critical issue with BSON serialization documented in CVE-2019-2391, see https://bit.ly/2KcpXdo for more details + dev: true + engines: + node: '>=0.6.19' + resolution: + integrity: sha512-IQX9/h7WdMBIW/q/++tGd+emQr0XMdeZ6icnT/74Xk9fnabWn+gZgpE+9V+gujL3hhJOoNrnDVY7tWdzc7NUTg== + /buffer-shims/1.0.0: + dev: true + resolution: + integrity: sha1-mXjOMXOIxkmth5MCjDR37wRKi1E= + /buffer-writer/1.0.1: + dev: true + resolution: + integrity: sha1-Iqk2kB4wKa/NdUfrRIfOtpejvwg= /cacheable-request/6.1.0: dependencies: clone-response: 1.0.2 @@ -346,17 +342,14 @@ packages: node: '>=6' resolution: integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - /camelcase/6.2.0: - dev: false - engines: - node: '>=10' + /cardinal/1.0.0: + dependencies: + ansicolors: 0.2.1 + redeyed: 1.0.1 + dev: true + hasBin: true resolution: - integrity: sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== - /caseless/0.12.0: - dev: false - optional: true - resolution: - integrity: sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + integrity: sha1-UOIcGwqjdyn5N33vGWtanOyTLuk= /chalk/2.4.2: dependencies: ansi-styles: 3.2.1 @@ -380,6 +373,7 @@ packages: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + dev: true engines: node: '>=10' resolution: @@ -410,6 +404,7 @@ packages: resolution: integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== /cli-boxes/2.2.1: + dev: true engines: node: '>=6' resolution: @@ -436,6 +431,7 @@ packages: /color-convert/2.0.1: dependencies: color-name: 1.1.4 + dev: true engines: node: '>=7.0.0' resolution: @@ -445,6 +441,7 @@ packages: resolution: integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= /color-name/1.1.4: + dev: true resolution: integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== /combined-stream/1.0.8: @@ -477,8 +474,6 @@ packages: resolution: integrity: sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= /core-util-is/1.0.2: - dev: false - optional: true resolution: integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= /cross-spawn/7.0.3: @@ -497,15 +492,6 @@ packages: node: '>=8' resolution: integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== - /dashdash/1.14.1: - dependencies: - assert-plus: 1.0.0 - dev: false - engines: - node: '>=0.10' - optional: true - resolution: - integrity: sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= /debug/2.6.9: dependencies: ms: 2.0.0 @@ -520,6 +506,7 @@ packages: /debug/4.3.1: dependencies: ms: 2.1.2 + dev: true engines: node: '>=6.0' peerDependencies: @@ -561,6 +548,12 @@ packages: optional: true resolution: integrity: sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + /denque/1.5.0: + dev: true + engines: + node: '>=0.10' + resolution: + integrity: sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ== /detect-libc/1.0.3: dev: false engines: @@ -606,26 +599,20 @@ packages: node: '>=8' resolution: integrity: sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== - /dottie/2.0.2: - dev: false - resolution: - integrity: sha512-fmrwR04lsniq/uSr8yikThDTrM7epXHBAAjH9TbeH3rEA8tdCO7mRzB9hdmdGyJCxF8KERo9CITcm3kGuoyMhg== /duplexer3/0.1.4: dev: true resolution: integrity: sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - /ecc-jsbn/0.1.2: - dependencies: - jsbn: 0.1.1 - safer-buffer: 2.1.2 - dev: false - optional: true + /each-series/1.0.0: + dev: true resolution: - integrity: sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + integrity: sha1-+Ibmxm39sl7x/nNWQUbuXLR4r8s= /emoji-regex/7.0.3: + dev: true resolution: integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== /emoji-regex/8.0.0: + dev: true resolution: integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== /end-of-stream/1.4.4: @@ -642,6 +629,10 @@ packages: node: '>=8.6' resolution: integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + /es6-promise/3.2.1: + dev: true + resolution: + integrity: sha1-7FYjOGgDKQkgcXDDlEjiREndH8Q= /escape-goat/2.1.1: dev: true engines: @@ -738,6 +729,13 @@ packages: node: ^10.12.0 || >=12.0.0 resolution: integrity: sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + /esprima/3.0.0: + dev: true + engines: + node: '>=0.10.0' + hasBin: true + resolution: + integrity: sha1-U88kes2ncxPlUcOqLnM0LT+099k= /esprima/4.0.1: dev: true engines: @@ -785,22 +783,12 @@ packages: node: '>=6' resolution: integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - /extend/3.0.2: - dev: false - optional: true - resolution: - integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - /extsprintf/1.3.0: - dev: false - engines: - '0': node >=0.6.0 - optional: true - resolution: - integrity: sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= /fast-deep-equal/3.1.3: + dev: true resolution: integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== /fast-json-stable-stringify/2.1.0: + dev: true resolution: integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== /fast-levenshtein/2.0.6: @@ -836,22 +824,6 @@ packages: dev: true resolution: integrity: sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== - /forever-agent/0.6.1: - dev: false - optional: true - resolution: - integrity: sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - /form-data/2.3.3: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.28 - dev: false - engines: - node: '>= 0.12' - optional: true - resolution: - integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== /fs-minipass/1.2.7: dependencies: minipass: 2.9.0 @@ -871,18 +843,6 @@ packages: - darwin resolution: integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - /fstream/1.0.12: - dependencies: - graceful-fs: 4.2.6 - inherits: 2.0.4 - mkdirp: 0.5.5 - rimraf: 2.7.1 - dev: false - engines: - node: '>=0.6' - optional: true - resolution: - integrity: sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg== /functional-red-black-tree/1.0.1: dev: true resolution: @@ -901,6 +861,12 @@ packages: optional: true resolution: integrity: sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + /generate-function/2.3.1: + dependencies: + is-property: 1.0.2 + dev: true + resolution: + integrity: sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== /get-stream/4.1.0: dependencies: pump: 3.0.0 @@ -917,13 +883,6 @@ packages: node: '>=8' resolution: integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - /getpass/0.1.7: - dependencies: - assert-plus: 1.0.0 - dev: false - optional: true - resolution: - integrity: sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= /glob-parent/5.1.1: dependencies: is-glob: 4.0.1 @@ -977,26 +936,9 @@ packages: resolution: integrity: sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== /graceful-fs/4.2.6: + dev: true resolution: integrity: sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== - /har-schema/2.0.0: - dev: false - engines: - node: '>=4' - optional: true - resolution: - integrity: sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - /har-validator/5.1.5: - dependencies: - ajv: 6.12.6 - har-schema: 2.0.0 - deprecated: this library is no longer supported - dev: false - engines: - node: '>=6' - optional: true - resolution: - integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== /has-flag/3.0.0: dev: true engines: @@ -1023,25 +965,11 @@ packages: dev: true resolution: integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - /http-signature/1.2.0: - dependencies: - assert-plus: 1.0.0 - jsprim: 1.4.1 - sshpk: 1.16.1 - dev: false - engines: - node: '>=0.8' - npm: '>=1.3.7' - optional: true - resolution: - integrity: sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= /iconv-lite/0.4.24: dependencies: safer-buffer: 2.1.2 - dev: false engines: node: '>=0.10.0' - optional: true resolution: integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== /ignore-by-default/1.0.1: @@ -1082,12 +1010,6 @@ packages: node: '>=0.8.19' resolution: integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o= - /inflection/1.12.0: - dev: false - engines: - '0': node >= 0.4.0 - resolution: - integrity: sha1-ogCTVlbW9fa8TcdQLhrstwMihBY= /inflight/1.0.6: dependencies: once: 1.4.0 @@ -1135,11 +1057,13 @@ packages: resolution: integrity: sha1-754xOG8DGn8NZDr4L95QxFfvAMs= /is-fullwidth-code-point/2.0.0: + dev: true engines: node: '>=4' resolution: integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= /is-fullwidth-code-point/3.0.0: + dev: true engines: node: '>=8' resolution: @@ -1185,7 +1109,12 @@ packages: node: '>=8' resolution: integrity: sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== + /is-property/1.0.2: + dev: true + resolution: + integrity: sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ= /is-typedarray/1.0.0: + dev: true resolution: integrity: sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= /is-yarn-global/0.3.0: @@ -1193,18 +1122,18 @@ packages: resolution: integrity: sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== /isarray/1.0.0: - dev: false - optional: true resolution: integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= /isexe/2.0.0: + dev: true resolution: integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - /isstream/0.1.2: - dev: false - optional: true + /js-string-escape/1.0.1: + dev: true + engines: + node: '>= 0.8' resolution: - integrity: sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + integrity: sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8= /js-tokens/4.0.0: dev: true resolution: @@ -1217,54 +1146,38 @@ packages: hasBin: true resolution: integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - /jsbn/0.1.1: - dev: false - optional: true - resolution: - integrity: sha1-peZUwuWi3rXyAdls77yoDA7y9RM= /json-buffer/3.0.0: dev: true resolution: integrity: sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + /json-buffer/3.0.1: + dev: false + resolution: + integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== /json-schema-traverse/0.4.1: + dev: true resolution: integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== /json-schema-traverse/1.0.0: dev: true resolution: integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - /json-schema/0.2.3: - dev: false - optional: true - resolution: - integrity: sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= /json-stable-stringify-without-jsonify/1.0.1: dev: true resolution: integrity: sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - /json-stringify-safe/5.0.1: - dev: false - optional: true - resolution: - integrity: sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - /jsprim/1.4.1: - dependencies: - assert-plus: 1.0.0 - extsprintf: 1.3.0 - json-schema: 0.2.3 - verror: 1.10.0 - dev: false - engines: - '0': node >=0.6.0 - optional: true - resolution: - integrity: sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= /keyv/3.1.0: dependencies: json-buffer: 3.0.0 dev: true resolution: integrity: sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + /keyv/4.0.3: + dependencies: + json-buffer: 3.0.1 + dev: false + resolution: + integrity: sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA== /latest-version/5.1.0: dependencies: package-json: 6.5.0 @@ -1298,9 +1211,17 @@ packages: dev: false resolution: integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + /lodash/4.1.0: + resolution: + integrity: sha1-KZiUKD3gGp7vvt/0xLmwCmoubpY= /lodash/4.17.20: + dev: true resolution: integrity: sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== + /long/4.0.0: + dev: true + resolution: + integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== /lowercase-keys/1.0.1: dev: true engines: @@ -1313,9 +1234,21 @@ packages: node: '>=8' resolution: integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + /lru-cache/2.5.0: + dev: true + resolution: + integrity: sha1-2COIrpyWC+y+oMc7uet5tsbOmus= + /lru-cache/4.1.5: + dependencies: + pseudomap: 1.0.2 + yallist: 2.1.2 + dev: true + resolution: + integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== /lru-cache/6.0.0: dependencies: yallist: 4.0.0 + dev: true engines: node: '>=10' resolution: @@ -1379,32 +1312,77 @@ packages: optional: true resolution: integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - /moment-timezone/0.5.33: + /mongodb-core/2.1.20: dependencies: - moment: 2.29.1 - dev: false + bson: 1.0.9 + require_optional: 1.0.1 + dev: true resolution: - integrity: sha512-PTc2vcT8K9J5/9rDEPe5czSIKgLoGsH8UNpA4qZTVw0Vd/Uz19geE9abbIOQKaAQFcnQ3v5YEXrbSc5BpshH+w== - /moment/2.29.1: - dev: false + integrity: sha512-IN57CX5/Q1bhDq6ShAR6gIv4koFsZP7L8WOK1S0lR0pVDQaScffSMV5jxubLsmZ7J+UdqmykKw4r9hG3XQEGgQ== + /mongodb/2.2.36: + dependencies: + es6-promise: 3.2.1 + mongodb-core: 2.1.20 + readable-stream: 2.2.7 + dev: true + engines: + node: '>=0.10.3' resolution: - integrity: sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== + integrity: sha512-P2SBLQ8Z0PVx71ngoXwo12+FiSfbNfGOClAao03/bant5DgLNkOPAck5IaJcEk4gKlQhDEURzfR3xuBG1/B+IA== + /mongojs/2.5.0: + dependencies: + each-series: 1.0.0 + mongodb: 2.2.36 + once: 1.4.0 + parse-mongo-url: 1.1.1 + readable-stream: 2.3.7 + thunky: 1.1.0 + to-mongodb-core: 2.0.0 + xtend: 4.0.2 + dev: true + resolution: + integrity: sha512-VJ2WSZheiVI7aFFA+470cMQLNQE3phsVemj1f4Hr1FkQmP5T6h5qInrSlakEliG3WIig8urvCEk2ZOfZvzONxQ== /ms/2.0.0: dev: true resolution: integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= /ms/2.1.2: + dev: true resolution: integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== /ms/2.1.3: resolution: integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - /n-readlines/1.0.1: - dev: false + /mysql2/1.5.2: + dependencies: + cardinal: 1.0.0 + denque: 1.5.0 + generate-function: 2.3.1 + iconv-lite: 0.4.24 + long: 4.0.0 + lru-cache: 4.1.5 + named-placeholders: 1.1.1 + object-assign: 4.1.1 + readable-stream: 2.3.2 + safe-buffer: 5.2.1 + seq-queue: 0.0.5 + sqlstring: 2.3.2 + dev: true engines: - node: '>=6.x.x' + node: '>= 4.0' resolution: - integrity: sha512-z4SyAIVgMy7CkgsoNw7YVz40v0g4+WWvvqy8+ZdHrCtgevcEO758WQyrYcw3XPxcLxF+//RszTz/rO48nzD0wQ== + integrity: sha512-976p3FxXdNMRRiF6Qe/FCOwaUYw3KXVJiIYu5iE5shM7ggIASgF6G/9gd9rhpBqP8V6MVa3KQJ6Ao1xBeGBljw== + /named-placeholders/1.1.1: + dependencies: + lru-cache: 2.5.0 + dev: true + resolution: + integrity: sha1-O3oNJiA910s6nfTJz7gnsvuQfmQ= + /nan/2.14.2: + dev: false + optional: true + resolution: + integrity: sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== /natural-compare/1.4.0: dev: true resolution: @@ -1421,38 +1399,12 @@ packages: optional: true resolution: integrity: sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg== - /node-addon-api/3.1.0: - dev: false - optional: true - resolution: - integrity: sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw== /node-fetch/2.6.1: dev: false engines: node: 4.x || >=6.0.0 resolution: integrity: sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - /node-gyp/3.8.0: - dependencies: - fstream: 1.0.12 - glob: 7.1.6 - graceful-fs: 4.2.6 - mkdirp: 0.5.5 - nopt: 3.0.6 - npmlog: 4.1.2 - osenv: 0.1.5 - request: 2.88.2 - rimraf: 2.7.1 - semver: 5.3.0 - tar: 2.2.2 - which: 1.3.1 - dev: false - engines: - node: '>= 0.8.0' - hasBin: true - optional: true - resolution: - integrity: sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA== /node-pre-gyp/0.11.0: dependencies: detect-libc: 1.0.3 @@ -1497,14 +1449,6 @@ packages: hasBin: true resolution: integrity: sha1-bd0hvSoxQXuScn3Vhfim83YI6+4= - /nopt/3.0.6: - dependencies: - abbrev: 1.1.1 - dev: false - hasBin: true - optional: true - resolution: - integrity: sha1-xkZdvwirzU2zWTF/eaxopkayj/k= /nopt/4.0.3: dependencies: abbrev: 1.1.1 @@ -1564,16 +1508,9 @@ packages: optional: true resolution: integrity: sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - /oauth-sign/0.9.0: - dev: false - optional: true - resolution: - integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== /object-assign/4.1.1: - dev: false engines: node: '>=0.10.0' - optional: true resolution: integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= /once/1.4.0: @@ -1633,6 +1570,10 @@ packages: node: '>=8' resolution: integrity: sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ== + /packet-reader/0.3.1: + dev: true + resolution: + integrity: sha1-zWLmCvjX/qinBexP+ZCHHEaHHyc= /parent-module/1.0.1: dependencies: callsites: 3.1.0 @@ -1641,6 +1582,10 @@ packages: node: '>=6' resolution: integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + /parse-mongo-url/1.1.1: + dev: true + resolution: + integrity: sha1-ZiON9fjnwMjKTNlw1KtqE3PrdbU= /path-is-absolute/1.0.1: engines: node: '>=0.10.0' @@ -1652,17 +1597,85 @@ packages: node: '>=8' resolution: integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - /performance-now/2.1.0: - dev: false - optional: true + /pg-connection-string/0.1.3: + dev: true resolution: - integrity: sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + integrity: sha1-2hhHsglA5C7hSSvq9l1J2RskXfc= + /pg-pool/2.0.10_pg@7.4.1: + dependencies: + pg: 7.4.1 + dev: true + peerDependencies: + pg: '>5.0' + resolution: + integrity: sha512-qdwzY92bHf3nwzIUcj+zJ0Qo5lpG/YxchahxIN8+ZVmXqkahKXsnl2aiJPHLYN9o5mB/leG+Xh6XKxtP7e0sjg== + /pg-types/1.12.1: + dependencies: + postgres-array: 1.0.3 + postgres-bytea: 1.0.0 + postgres-date: 1.0.7 + postgres-interval: 1.2.0 + dev: true + resolution: + integrity: sha1-1kCH45A7WP+q0nnnWVxSIIoUw9I= + /pg/7.4.1: + dependencies: + buffer-writer: 1.0.1 + js-string-escape: 1.0.1 + packet-reader: 0.3.1 + pg-connection-string: 0.1.3 + pg-pool: 2.0.10_pg@7.4.1 + pg-types: 1.12.1 + pgpass: 1.0.4 + semver: 4.3.2 + dev: true + engines: + node: '>= 4.5.0' + resolution: + integrity: sha512-Pi5qYuXro5PAD9xXx8h7bFtmHgAQEG6/SCNyi7gS3rvb/ZQYDmxKchfB0zYtiSJNWq9iXTsYsHjrM+21eBcN1A== + /pgpass/1.0.4: + dependencies: + split2: 3.2.2 + dev: true + resolution: + integrity: sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w== /picomatch/2.2.2: dev: true engines: node: '>=8.6' resolution: integrity: sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + /pify/3.0.0: + engines: + node: '>=4' + resolution: + integrity: sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + /postgres-array/1.0.3: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-5wClXrAP0+78mcsNX3/ithQ5exKvCyK5lr5NEEEeGwwM6NJdQgzIJBVxLvRW+huFpX92F2QnZ5CcokH0VhK2qQ== + /postgres-bytea/1.0.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-AntTPAqokOJtFy1Hz5zOzFIazTU= + /postgres-date/1.0.7: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== + /postgres-interval/1.2.0: + dependencies: + xtend: 4.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ== /prelude-ls/1.2.1: dev: true engines: @@ -1693,9 +1706,11 @@ packages: optional: true resolution: integrity: sha512-I1Ys8HA+9aSKQ2jbkO3r6p9Z+tMpSssGhucgxXvc0sSpOi0kK550rDQnKtAS7Z5TzPQeLJdBmK2Br8x+5137lg== + /process-nextick-args/1.0.7: + dev: true + resolution: + integrity: sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= /process-nextick-args/2.0.1: - dev: false - optional: true resolution: integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== /progress/2.0.3: @@ -1704,11 +1719,10 @@ packages: node: '>=0.4.0' resolution: integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - /psl/1.8.0: - dev: false - optional: true + /pseudomap/1.0.2: + dev: true resolution: - integrity: sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + integrity: sha1-8FKijacOYYkX7wqKw0wa5aaChrM= /pstree.remy/1.1.8: dev: true resolution: @@ -1721,6 +1735,7 @@ packages: resolution: integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== /punycode/2.1.1: + dev: true engines: node: '>=6' resolution: @@ -1733,13 +1748,6 @@ packages: node: '>=8' resolution: integrity: sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A== - /qs/6.5.2: - dev: false - engines: - node: '>=0.6' - optional: true - resolution: - integrity: sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== /rc/1.2.8: dependencies: deep-extend: 0.6.0 @@ -1749,6 +1757,30 @@ packages: hasBin: true resolution: integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + /readable-stream/2.2.7: + dependencies: + buffer-shims: 1.0.0 + core-util-is: 1.0.2 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 1.0.7 + string_decoder: 1.0.3 + util-deprecate: 1.0.2 + dev: true + resolution: + integrity: sha1-BwV6y+JGeyIELTb5jFrVBwVOlbE= + /readable-stream/2.3.2: + dependencies: + core-util-is: 1.0.2 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 1.0.7 + safe-buffer: 5.1.2 + string_decoder: 1.0.3 + util-deprecate: 1.0.2 + dev: true + resolution: + integrity: sha1-WgTfBeT1f+Pw3Gj90R3FyXx+b00= /readable-stream/2.3.7: dependencies: core-util-is: 1.0.2 @@ -1758,10 +1790,18 @@ packages: safe-buffer: 5.1.2 string_decoder: 1.1.1 util-deprecate: 1.0.2 - dev: false - optional: true resolution: integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + /readable-stream/3.6.0: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== /readdirp/3.5.0: dependencies: picomatch: 2.2.2 @@ -1770,6 +1810,12 @@ packages: node: '>=8.10.0' resolution: integrity: sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== + /redeyed/1.0.1: + dependencies: + esprima: 3.0.0 + dev: true + resolution: + integrity: sha1-6WwZO0DAgWsArshCaY5hGF5VSYo= /regexpp/3.1.0: dev: true engines: @@ -1792,41 +1838,25 @@ packages: node: '>=8' resolution: integrity: sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw== - /request/2.88.2: - dependencies: - aws-sign2: 0.7.0 - aws4: 1.11.0 - caseless: 0.12.0 - combined-stream: 1.0.8 - extend: 3.0.2 - forever-agent: 0.6.1 - form-data: 2.3.3 - har-validator: 5.1.5 - http-signature: 1.2.0 - is-typedarray: 1.0.0 - isstream: 0.1.2 - json-stringify-safe: 5.0.1 - mime-types: 2.1.28 - oauth-sign: 0.9.0 - performance-now: 2.1.0 - qs: 6.5.2 - safe-buffer: 5.2.1 - tough-cookie: 2.5.0 - tunnel-agent: 0.6.0 - uuid: 3.4.0 - deprecated: request has been deprecated, see https://github.com/request/request/issues/3142 - dev: false - engines: - node: '>= 6' - optional: true - resolution: - integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== /require-from-string/2.0.2: dev: true engines: node: '>=0.10.0' resolution: integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + /require_optional/1.0.1: + dependencies: + resolve-from: 2.0.0 + semver: 5.7.1 + dev: true + resolution: + integrity: sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g== + /resolve-from/2.0.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-lICrIOlP+h2egKgEx+oUdhGWa1c= /resolve-from/4.0.0: dev: true engines: @@ -1839,12 +1869,6 @@ packages: dev: true resolution: integrity: sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - /retry-as-promised/3.2.0: - dependencies: - any-promise: 1.3.0 - dev: false - resolution: - integrity: sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg== /rimraf/2.7.1: dependencies: glob: 7.1.6 @@ -1861,18 +1885,12 @@ packages: resolution: integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== /safe-buffer/5.1.2: - dev: false - optional: true resolution: integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== /safe-buffer/5.2.1: - dev: false - optional: true resolution: integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== /safer-buffer/2.1.2: - dev: false - optional: true resolution: integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== /sax/1.2.4: @@ -1888,12 +1906,11 @@ packages: node: '>=8' resolution: integrity: sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg== - /semver/5.3.0: - dev: false + /semver/4.3.2: + dev: true hasBin: true - optional: true resolution: - integrity: sha1-myzl094C0XxgEq0yaqa00M9U+U8= + integrity: sha1-x6BxWKgL7dBSNVt3DYLWZA+AO+c= /semver/5.7.1: hasBin: true resolution: @@ -1906,58 +1923,16 @@ packages: /semver/7.3.4: dependencies: lru-cache: 6.0.0 + dev: true engines: node: '>=10' hasBin: true resolution: integrity: sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - /sequelize-pool/6.1.0: - dev: false - engines: - node: '>= 10.0.0' + /seq-queue/0.0.5: + dev: true resolution: - integrity: sha512-4YwEw3ZgK/tY/so+GfnSgXkdwIJJ1I32uZJztIEgZeAO6HMgj64OzySbWLgxj+tXhZCJnzRfkY9gINw8Ft8ZMg== - /sequelize/6.5.0_sqlite3@5.0.1: - dependencies: - debug: 4.3.1 - dottie: 2.0.2 - inflection: 1.12.0 - lodash: 4.17.20 - moment: 2.29.1 - moment-timezone: 0.5.33 - retry-as-promised: 3.2.0 - semver: 7.3.4 - sequelize-pool: 6.1.0 - sqlite3: 5.0.1 - toposort-class: 1.0.1 - uuid: 8.3.2 - validator: 10.11.0 - wkx: 0.5.0 - dev: false - engines: - node: '>=10.0.0' - peerDependencies: - mariadb: '*' - mysql2: '*' - pg: '*' - pg-hstore: '*' - sqlite3: '*' - tedious: '*' - peerDependenciesMeta: - mariadb: - optional: true - mysql2: - optional: true - pg: - optional: true - pg-hstore: - optional: true - sqlite3: - optional: true - tedious: - optional: true - resolution: - integrity: sha512-owBt8fnzVy8E1OvyCyfCdVk7OOLyPVrBCMEf+CvRReC5oCyo+UqeXCtwaex9L6LM9ifZ1i3TG3sFeM5MgLK0CQ== + integrity: sha1-1WgS4cAXpuTnw+Ojeh2m143TyT4= /set-blocking/2.0.0: dev: false optional: true @@ -1994,42 +1969,40 @@ packages: node: '>=10' resolution: integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + /sliced/0.0.5: + resolution: + integrity: sha1-XtwETKTrb3gW1Qui/GPiXY/kcH8= + /split2/3.2.2: + dependencies: + readable-stream: 3.6.0 + dev: true + resolution: + integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== /sprintf-js/1.0.3: dev: true resolution: integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - /sqlite3/5.0.1: + /sql/0.78.0: dependencies: - node-addon-api: 3.1.0 + lodash: 4.1.0 + sliced: 0.0.5 + resolution: + integrity: sha1-iUWF1WER27F2h0Gk2ZNcgshZWUk= + /sqlite3/4.2.0: + dependencies: + nan: 2.14.2 node-pre-gyp: 0.11.0 dev: false optional: true - optionalDependencies: - node-gyp: 3.8.0 - peerDependenciesMeta: - node-gyp: - optional: true requiresBuild: true resolution: - integrity: sha512-kh2lTIcYNfmVcvhVJihsYuPj9U0xzBbh6bmqILO2hkryWSC9RRhzYmkIDtJkJ+d8Kg4wZRJ0T1reyHUEspICfg== - /sshpk/1.16.1: - dependencies: - asn1: 0.2.4 - assert-plus: 1.0.0 - bcrypt-pbkdf: 1.0.2 - dashdash: 1.14.1 - ecc-jsbn: 0.1.2 - getpass: 0.1.7 - jsbn: 0.1.1 - safer-buffer: 2.1.2 - tweetnacl: 0.14.5 - dev: false + integrity: sha512-roEOz41hxui2Q7uYnWsjMOTry6TcNUNmp8audCx18gF10P2NknwdpF+E+HKvz/F2NvPKGGBF4NGc+ZPQ+AABwg== + /sqlstring/2.3.2: + dev: true engines: - node: '>=0.10.0' - hasBin: true - optional: true + node: '>= 0.6' resolution: - integrity: sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + integrity: sha512-vF4ZbYdKS8OnoJAWBmMxCQDkiEBkGQYU7UZPtL8flbDRSNkhaXvRJ279ZtI6M+zDaQovVU4tuRgzK5fVhvFAhg== /string-width/1.0.2: dependencies: code-point-at: 1.1.0 @@ -2046,6 +2019,7 @@ packages: emoji-regex: 7.0.3 is-fullwidth-code-point: 2.0.0 strip-ansi: 5.2.0 + dev: true engines: node: '>=6' resolution: @@ -2055,17 +2029,28 @@ packages: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.0 + dev: true engines: node: '>=8' resolution: integrity: sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + /string_decoder/1.0.3: + dependencies: + safe-buffer: 5.1.2 + dev: true + resolution: + integrity: sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ== /string_decoder/1.1.1: dependencies: safe-buffer: 5.1.2 - dev: false - optional: true resolution: integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + /string_decoder/1.3.0: + dependencies: + safe-buffer: 5.2.1 + dev: true + resolution: + integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== /strip-ansi/3.0.1: dependencies: ansi-regex: 2.1.1 @@ -2078,6 +2063,7 @@ packages: /strip-ansi/5.2.0: dependencies: ansi-regex: 4.1.0 + dev: true engines: node: '>=6' resolution: @@ -2085,6 +2071,7 @@ packages: /strip-ansi/6.0.0: dependencies: ansi-regex: 5.0.0 + dev: true engines: node: '>=8' resolution: @@ -2135,15 +2122,6 @@ packages: node: '>=10.0.0' resolution: integrity: sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g== - /tar/2.2.2: - dependencies: - block-stream: 0.0.9 - fstream: 1.0.12 - inherits: 2.0.4 - dev: false - optional: true - resolution: - integrity: sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA== /tar/4.4.13: dependencies: chownr: 1.1.4 @@ -2178,6 +2156,14 @@ packages: dev: true resolution: integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + /thunky/1.1.0: + dev: true + resolution: + integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== + /to-mongodb-core/2.0.0: + dev: true + resolution: + integrity: sha1-NZbsdhOsmtO5ioncua77pWnNJ+s= /to-readable-stream/1.0.0: dev: true engines: @@ -2192,18 +2178,6 @@ packages: node: '>=8.0' resolution: integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - /to-time-monthsfork/1.1.4: - dependencies: - bignumber.js: 2.4.0 - dev: false - engines: - node: '>=4.6' - resolution: - integrity: sha512-3bWuIwm9QeOAq/UClxFp86QMSJ4GVHmAT8X+pkM0mIMVrpJPLfSieY5qvSsfLJugLNWTVpYJ2ayKWXH3jcAdow== - /toposort-class/1.0.1: - dev: false - resolution: - integrity: sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg= /touch/3.1.0: dependencies: nopt: 1.0.10 @@ -2211,28 +2185,6 @@ packages: hasBin: true resolution: integrity: sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== - /tough-cookie/2.5.0: - dependencies: - psl: 1.8.0 - punycode: 2.1.1 - dev: false - engines: - node: '>=0.8' - optional: true - resolution: - integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - /tunnel-agent/0.6.0: - dependencies: - safe-buffer: 5.2.1 - dev: false - optional: true - resolution: - integrity: sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - /tweetnacl/0.14.5: - dev: false - optional: true - resolution: - integrity: sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= /tweetnacl/1.0.3: dev: false resolution: @@ -2251,12 +2203,6 @@ packages: node: '>=8' resolution: integrity: sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== - /type-fest/0.20.2: - dev: false - engines: - node: '>=10' - resolution: - integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== /type-fest/0.8.1: dev: true engines: @@ -2306,6 +2252,7 @@ packages: /uri-js/4.4.1: dependencies: punycode: 2.1.1 + dev: true resolution: integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== /url-parse-lax/3.0.0: @@ -2317,50 +2264,12 @@ packages: resolution: integrity: sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= /util-deprecate/1.0.2: - dev: false - optional: true resolution: integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - /uuid/3.4.0: - dev: false - hasBin: true - optional: true - resolution: - integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - /uuid/8.3.2: - dev: false - hasBin: true - resolution: - integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== /v8-compile-cache/2.2.0: dev: true resolution: integrity: sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q== - /validator/10.11.0: - dev: false - engines: - node: '>= 0.10' - resolution: - integrity: sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw== - /verror/1.10.0: - dependencies: - assert-plus: 1.0.0 - core-util-is: 1.0.2 - extsprintf: 1.3.0 - dev: false - engines: - '0': node >=0.6.0 - optional: true - resolution: - integrity: sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - /which/1.3.1: - dependencies: - isexe: 2.0.0 - dev: false - hasBin: true - optional: true - resolution: - integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== /which/2.0.2: dependencies: isexe: 2.0.0 @@ -2380,32 +2289,17 @@ packages: /widest-line/3.1.0: dependencies: string-width: 4.2.0 + dev: true engines: node: '>=8' resolution: integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== - /wkx/0.5.0: - dependencies: - '@types/node': 14.14.28 - dev: false - resolution: - integrity: sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg== /word-wrap/1.2.3: dev: true engines: node: '>=0.10.0' resolution: integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - /wrap-ansi/7.0.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.0 - strip-ansi: 6.0.0 - dev: false - engines: - node: '>=10' - resolution: - integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== /wrappy/1.0.2: resolution: integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= @@ -2438,25 +2332,36 @@ packages: node: '>=8' resolution: integrity: sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== + /xtend/4.0.2: + dev: true + engines: + node: '>=0.4' + resolution: + integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + /yallist/2.1.2: + dev: true + resolution: + integrity: sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= /yallist/3.1.1: dev: false optional: true resolution: integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== /yallist/4.0.0: + dev: true resolution: integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== specifiers: - '@eartharoid/dtf': ^1.0.8 - boxen: ^5.0.0 + '@eartharoid/i18n': ^0.0.1 + '@keyv/mongo': ^1.1.0 + '@keyv/mysql': ^1.1.4 + '@keyv/postgres': ^1.0.16 + '@keyv/sqlite': ^2.0.2 discord.js: ^12.5.1 dotenv: ^8.2.0 - eslint: ^7.19.0 + eslint: ^7.20.0 + keyv: ^4.0.3 leekslazylogger: ^2.0.7 - n-readlines: ^1.0.1 node-fetch: ^2.6.1 nodemon: ^2.0.7 - sequelize: ^6.5.0 - sqlite3: ^5.0.0 terminal-link: ^2.1.1 - to-time-monthsfork: ^1.1.3 diff --git a/src/index.js b/src/index.js index aecee1d..c43b4e2 100644 --- a/src/index.js +++ b/src/index.js @@ -1,22 +1,87 @@ /** * DiscordTickets * Copyright (C) 2021 Isaac Saunders - + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - + * * @name @eartharoid/discordtickets * @description An open-source & self-hosted Discord bot for ticket management. * @copyright 2021 Isaac Saunders * @license GNU-GPLv3 - */ \ No newline at end of file + */ + +const node_version = Number(process.versions.node.split('.')[0]); +if (node_version < 14) return console.log(`Error: DiscordTickets does not work on Node v${node_version}. Please upgrade to v14 or above.`); +const { version } = require('../package.json'); + +const fs = require('fs'); +const { path } = require('./utils/fs'); +if (!fs.existsSync(path('./.env'))) return console.log('Please make a copy of \'example.env\' called \'.env\''); +if (!fs.existsSync(path('./user/config.js'))) return console.log('Please make a copy of \'example.config.js\' called \'config.js\''); + +require('dotenv').config(); + +const config = require('../user/config'); + +const Logger = require('leekslazylogger'); +const log = new Logger({ + name: 'DiscordTickets by eartharoid', + debug: config.debug, + logToFile: config.logs.enabled, + keepFor: config.logs.keep_for +}); + + +const terminalLink = require('terminal-link'); +log.report = error => { + let report = [ + '<< Issue report >>', + 'Please include this information if you ask for help about the following error!', + `Support server: ${terminalLink('go.eartharoid.me/discord', 'https://go.eartharoid.me/discord')}`, + `Node.JS version: ${process.versions.node.split('.')}`, + `Bot version: ${version}`, + `Platform: ${process.platform}` + ]; + log.warn(report.join('\n')); + if (error) log.error(error); +}; + +const { Client } = require('discord.js'); +class Bot extends Client { + constructor() { + super({ + autoReconnect: true, + }); + + Object.assign(this, { + config, + db: require('./modules/database')(log), + log, + }); + + this.log.info('Connecting to Discord API'); + + this.login(); + } +} + +new Bot(); + +process.on('unhandledRejection', error => { + log.report(); + log.warn('An error was not caught'); + if (error instanceof Error) log.warn(`Uncaught ${error.name}: ${error}`); + log.error(error); +}); + diff --git a/src/modules/database.js b/src/modules/database.js new file mode 100644 index 0000000..0011f69 --- /dev/null +++ b/src/modules/database.js @@ -0,0 +1,71 @@ +const Keyv = require('keyv'); + +const { homepage } = require('../../package.json'); +const { path } = require('../utils/fs'); + +const types = { + sqlite: 'sqlite', + mysql: 'mysql', + mongo: 'mongo', + mongodb: 'mongo', + postgre: 'postgres', + postgres: 'postgres', + postgresql: 'postgres', +}; + +const supported = Object.keys(types); + +module.exports = (log) => { + + let type = (process.env.DB_TYPE || 'sqlite').toLowerCase(); + + if (!supported.includes(type)) { + log.report('Invalid database type'); + throw new Error('DB_TYPE is not valid type'); + } + + try { + require(`@keyv/${types[type]}`); + } catch { + log.report('Specified database type is not installed'); + throw new Error(`"@keyv/${types[type]}" is not installed, please install is manually`); + } + + const { + DB_HOST, + DB_USER, + DB_PASS, + DB_NAME + } = process.env; + let database; + + switch (type) { + case 'mysql': + database = `mysql://${DB_USER}:${DB_PASS}@${DB_HOST}/${DB_NAME}`; + break; + case 'mongo': + case 'mongodb': + database = `mongodb://${DB_USER}:${DB_PASS}@${DB_HOST}/${DB_NAME}`; + break; + case 'postgre': + case 'postgres': + case 'postgresql': + database = `postgresql://${DB_USER}:${DB_PASS}@${DB_HOST}/${DB_NAME}`; + break; + default: // sqlite + database = `sqlite://${path('./user/database.sqlite')}`; + break; + } + + return { + servers: new Keyv(database, { + namespace: 'servers' + }), + tickets: new Keyv(database, { + namespace: 'tickets' + }), + messages: new Keyv(database, { + namespace: 'messages' + }) + }; +}; \ No newline at end of file diff --git a/src/utils/fs.js b/src/utils/fs.js new file mode 100644 index 0000000..4fb1d95 --- /dev/null +++ b/src/utils/fs.js @@ -0,0 +1,5 @@ +const { join } = require('path'); + +module.exports = { + path: path => join(__dirname, '../../', path), +}; \ No newline at end of file diff --git a/user/config.js b/user/config.js index 5e670c6..eb5825d 100644 --- a/user/config.js +++ b/user/config.js @@ -23,9 +23,6 @@ */ module.exports = { - storage: { - type: 'sqlite' - }, portal: { enabled: true, host: 'https://tickets.eartharoid.me' diff --git a/user/example.config.js b/user/example.config.js index 8c58b28..88cb378 100644 --- a/user/example.config.js +++ b/user/example.config.js @@ -23,9 +23,6 @@ */ module.exports = { - storage: { - type: 'sqlite' - }, portal: { enabled: false, host: 'https://tickets.example.com' diff --git a/user/plugins/.gitkeep b/user/plugins/.gitkeep new file mode 100644 index 0000000..e69de29