add schedule working

This commit is contained in:
Tykayn 2023-07-03 23:12:20 +02:00 committed by tykayn
parent 5f7836ed7c
commit b5b8696c91
7 changed files with 3270 additions and 4370 deletions

View File

@ -1,13 +1,13 @@
var createError = require('http-errors'); let createError = require('http-errors');
var express = require('express'); let express = require('express');
var path = require('path'); let path = require('path');
var cookieParser = require('cookie-parser'); let cookieParser = require('cookie-parser');
var logger = require('morgan'); let logger = require('morgan');
var indexRouter = require('./routes/index'); let indexRouter = require('./routes/index');
var usersRouter = require('./routes/users'); let usersRouter = require('./routes/users');
const listenPort = 8000; const listenPort = 8000;
var app = express(); let app = express();
// view engine setup // view engine setup
app.set('views', path.join(__dirname, 'views')); app.set('views', path.join(__dirname, 'views'));

98
package-lock.json generated
View File

@ -19,7 +19,6 @@
"moment": "^2.29.4", "moment": "^2.29.4",
"morgan": "~1.9.1", "morgan": "~1.9.1",
"node-fs": "^0.1.7", "node-fs": "^0.1.7",
"nodemon": "^2.0.19",
"oauth": "^0.9.15", "oauth": "^0.9.15",
"rss-parser": "^3.12.0", "rss-parser": "^3.12.0",
"sqlite3": "^5.0.8", "sqlite3": "^5.0.8",
@ -31,6 +30,7 @@
"fs": "^0.0.1-security", "fs": "^0.0.1-security",
"https": "^1.0.0", "https": "^1.0.0",
"node-fetch": "^3.2.10", "node-fetch": "^3.2.10",
"nodemon": "^2.0.22",
"request-promise": "^4.2.6", "request-promise": "^4.2.6",
"sharp": "^0.31.2" "sharp": "^0.31.2"
} }
@ -422,6 +422,7 @@
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
"integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
"dev": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"normalize-path": "^3.0.0", "normalize-path": "^3.0.0",
@ -561,6 +562,7 @@
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=8" "node": ">=8"
@ -645,6 +647,7 @@
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"fill-range": "^7.0.1" "fill-range": "^7.0.1"
@ -835,6 +838,7 @@
"version": "3.5.3", "version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"dev": true,
"funding": [ "funding": [
{ {
"type": "individual", "type": "individual",
@ -1579,6 +1583,7 @@
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"to-regex-range": "^5.0.1" "to-regex-range": "^5.0.1"
@ -1781,6 +1786,7 @@
"version": "5.1.2", "version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"is-glob": "^4.0.1" "is-glob": "^4.0.1"
@ -1828,6 +1834,7 @@
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=4" "node": ">=4"
@ -2045,6 +2052,7 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
"integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
"dev": true,
"license": "ISC" "license": "ISC"
}, },
"node_modules/imurmurhash": { "node_modules/imurmurhash": {
@ -2122,6 +2130,7 @@
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"binary-extensions": "^2.0.0" "binary-extensions": "^2.0.0"
@ -2140,6 +2149,7 @@
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
@ -2158,6 +2168,7 @@
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"is-extglob": "^2.1.1" "is-extglob": "^2.1.1"
@ -2177,6 +2188,7 @@
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=0.12.0" "node": ">=0.12.0"
@ -2840,16 +2852,15 @@
} }
}, },
"node_modules/nodemon": { "node_modules/nodemon": {
"version": "2.0.19", "version": "2.0.22",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.19.tgz", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz",
"integrity": "sha512-4pv1f2bMDj0Eeg/MhGqxrtveeQ5/G/UVe9iO6uTZzjnRluSA4PVWf8CW99LUPwGB3eNIA7zUFoP77YuI7hOc0A==", "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==",
"hasInstallScript": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"chokidar": "^3.5.2", "chokidar": "^3.5.2",
"debug": "^3.2.7", "debug": "^3.2.7",
"ignore-by-default": "^1.0.1", "ignore-by-default": "^1.0.1",
"minimatch": "^3.0.4", "minimatch": "^3.1.2",
"pstree.remy": "^1.1.8", "pstree.remy": "^1.1.8",
"semver": "^5.7.1", "semver": "^5.7.1",
"simple-update-notifier": "^1.0.7", "simple-update-notifier": "^1.0.7",
@ -2872,6 +2883,7 @@
"version": "3.2.7", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"ms": "^2.1.1" "ms": "^2.1.1"
@ -2881,12 +2893,14 @@
"version": "2.1.3", "version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/nodemon/node_modules/semver": { "node_modules/nodemon/node_modules/semver": {
"version": "5.7.1", "version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true,
"license": "ISC", "license": "ISC",
"bin": { "bin": {
"semver": "bin/semver" "semver": "bin/semver"
@ -2911,6 +2925,7 @@
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
@ -3175,6 +3190,7 @@
"version": "2.3.1", "version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=8.6" "node": ">=8.6"
@ -3317,6 +3333,7 @@
"version": "1.1.8", "version": "1.1.8",
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/pump": { "node_modules/pump": {
@ -3495,6 +3512,7 @@
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"picomatch": "^2.2.1" "picomatch": "^2.2.1"
@ -3839,6 +3857,7 @@
"version": "1.0.7", "version": "1.0.7",
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz",
"integrity": "sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew==", "integrity": "sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"semver": "~7.0.0" "semver": "~7.0.0"
@ -3851,6 +3870,7 @@
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
"integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
"dev": true,
"license": "ISC", "license": "ISC",
"bin": { "bin": {
"semver": "bin/semver.js" "semver": "bin/semver.js"
@ -4141,6 +4161,7 @@
"version": "5.5.0", "version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"has-flag": "^3.0.0" "has-flag": "^3.0.0"
@ -4217,6 +4238,7 @@
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"is-number": "^7.0.0" "is-number": "^7.0.0"
@ -4229,6 +4251,7 @@
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
"dev": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"nopt": "~1.0.10" "nopt": "~1.0.10"
@ -4241,6 +4264,7 @@
"version": "1.0.10", "version": "1.0.10",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
"integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"abbrev": "1" "abbrev": "1"
@ -4399,6 +4423,7 @@
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
"integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/underscore": { "node_modules/underscore": {
@ -4959,6 +4984,7 @@
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
"integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
"dev": true,
"requires": { "requires": {
"normalize-path": "^3.0.0", "normalize-path": "^3.0.0",
"picomatch": "^2.0.4" "picomatch": "^2.0.4"
@ -5057,7 +5083,8 @@
"binary-extensions": { "binary-extensions": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true
}, },
"bl": { "bl": {
"version": "4.1.0", "version": "4.1.0",
@ -5130,6 +5157,7 @@
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"requires": { "requires": {
"fill-range": "^7.0.1" "fill-range": "^7.0.1"
} }
@ -5260,6 +5288,7 @@
"version": "3.5.3", "version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"dev": true,
"requires": { "requires": {
"anymatch": "~3.1.2", "anymatch": "~3.1.2",
"braces": "~3.0.2", "braces": "~3.0.2",
@ -5786,6 +5815,7 @@
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"requires": { "requires": {
"to-regex-range": "^5.0.1" "to-regex-range": "^5.0.1"
} }
@ -5931,6 +5961,7 @@
"version": "5.1.2", "version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"requires": { "requires": {
"is-glob": "^4.0.1" "is-glob": "^4.0.1"
} }
@ -5963,7 +5994,8 @@
"has-flag": { "has-flag": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"dev": true
}, },
"has-unicode": { "has-unicode": {
"version": "2.0.1", "version": "2.0.1",
@ -6112,7 +6144,8 @@
"ignore-by-default": { "ignore-by-default": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
"integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
"dev": true
}, },
"imurmurhash": { "imurmurhash": {
"version": "0.1.4", "version": "0.1.4",
@ -6173,6 +6206,7 @@
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"requires": { "requires": {
"binary-extensions": "^2.0.0" "binary-extensions": "^2.0.0"
} }
@ -6185,7 +6219,8 @@
"is-extglob": { "is-extglob": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true
}, },
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "3.0.0", "version": "3.0.0",
@ -6196,6 +6231,7 @@
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"requires": { "requires": {
"is-extglob": "^2.1.1" "is-extglob": "^2.1.1"
} }
@ -6209,7 +6245,8 @@
"is-number": { "is-number": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
}, },
"is-promise": { "is-promise": {
"version": "2.2.2", "version": "2.2.2",
@ -6670,14 +6707,15 @@
} }
}, },
"nodemon": { "nodemon": {
"version": "2.0.19", "version": "2.0.22",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.19.tgz", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz",
"integrity": "sha512-4pv1f2bMDj0Eeg/MhGqxrtveeQ5/G/UVe9iO6uTZzjnRluSA4PVWf8CW99LUPwGB3eNIA7zUFoP77YuI7hOc0A==", "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==",
"dev": true,
"requires": { "requires": {
"chokidar": "^3.5.2", "chokidar": "^3.5.2",
"debug": "^3.2.7", "debug": "^3.2.7",
"ignore-by-default": "^1.0.1", "ignore-by-default": "^1.0.1",
"minimatch": "^3.0.4", "minimatch": "^3.1.2",
"pstree.remy": "^1.1.8", "pstree.remy": "^1.1.8",
"semver": "^5.7.1", "semver": "^5.7.1",
"simple-update-notifier": "^1.0.7", "simple-update-notifier": "^1.0.7",
@ -6690,6 +6728,7 @@
"version": "3.2.7", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"requires": { "requires": {
"ms": "^2.1.1" "ms": "^2.1.1"
} }
@ -6697,12 +6736,14 @@
"ms": { "ms": {
"version": "2.1.3", "version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true
}, },
"semver": { "semver": {
"version": "5.7.1", "version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true
} }
} }
}, },
@ -6717,7 +6758,8 @@
"normalize-path": { "normalize-path": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true
}, },
"npmlog": { "npmlog": {
"version": "5.0.1", "version": "5.0.1",
@ -6899,7 +6941,8 @@
"picomatch": { "picomatch": {
"version": "2.3.1", "version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true
}, },
"pkg-dir": { "pkg-dir": {
"version": "4.2.0", "version": "4.2.0",
@ -7007,7 +7050,8 @@
"pstree.remy": { "pstree.remy": {
"version": "1.1.8", "version": "1.1.8",
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
"dev": true
}, },
"pump": { "pump": {
"version": "3.0.0", "version": "3.0.0",
@ -7142,6 +7186,7 @@
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
"requires": { "requires": {
"picomatch": "^2.2.1" "picomatch": "^2.2.1"
} }
@ -7374,6 +7419,7 @@
"version": "1.0.7", "version": "1.0.7",
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz",
"integrity": "sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew==", "integrity": "sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew==",
"dev": true,
"requires": { "requires": {
"semver": "~7.0.0" "semver": "~7.0.0"
}, },
@ -7381,7 +7427,8 @@
"semver": { "semver": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
"integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==" "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
"dev": true
} }
} }
}, },
@ -7585,6 +7632,7 @@
"version": "5.5.0", "version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": { "requires": {
"has-flag": "^3.0.0" "has-flag": "^3.0.0"
} }
@ -7651,6 +7699,7 @@
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"requires": { "requires": {
"is-number": "^7.0.0" "is-number": "^7.0.0"
} }
@ -7659,6 +7708,7 @@
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
"dev": true,
"requires": { "requires": {
"nopt": "~1.0.10" "nopt": "~1.0.10"
}, },
@ -7667,6 +7717,7 @@
"version": "1.0.10", "version": "1.0.10",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
"integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
"dev": true,
"requires": { "requires": {
"abbrev": "1" "abbrev": "1"
} }
@ -7786,7 +7837,8 @@
"undefsafe": { "undefsafe": {
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
"integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
"dev": true
}, },
"underscore": { "underscore": {
"version": "1.7.0", "version": "1.7.0",

View File

@ -3,9 +3,9 @@
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
"start": "node ./bin/www", "start": "nodemon ./bin/www",
"publish": "node ./publisher.js", "publish": "nodemon ./publisher.js",
"scrap": "node scrapper.mjs" "scrap": "nodemon scrapper.mjs"
}, },
"dependencies": { "dependencies": {
"@databases/sqlite": "^4.0.0", "@databases/sqlite": "^4.0.0",
@ -19,7 +19,6 @@
"moment": "^2.29.4", "moment": "^2.29.4",
"morgan": "~1.9.1", "morgan": "~1.9.1",
"node-fs": "^0.1.7", "node-fs": "^0.1.7",
"nodemon": "^2.0.19",
"oauth": "^0.9.15", "oauth": "^0.9.15",
"rss-parser": "^3.12.0", "rss-parser": "^3.12.0",
"sqlite3": "^5.0.8", "sqlite3": "^5.0.8",
@ -31,6 +30,7 @@
"fs": "^0.0.1-security", "fs": "^0.0.1-security",
"https": "^1.0.0", "https": "^1.0.0",
"node-fetch": "^3.2.10", "node-fetch": "^3.2.10",
"nodemon": "^2.0.22",
"request-promise": "^4.2.6", "request-promise": "^4.2.6",
"sharp": "^0.31.2" "sharp": "^0.31.2"
} }

View File

@ -69,3 +69,22 @@ input{
box-shadow: 0 0 1em #2F6FAB; box-shadow: 0 0 1em #2F6FAB;
border: solid 3px #2F6FAB; border: solid 3px #2F6FAB;
} }
.wip{
margin: 2em;
border: solid 2px #2F6FAB;
}
fieldset.wip{
margin-top: 12em;
}
.time_spans_choice{
padding: 0.5rem;
display: block;
width: 10rem;
float:left;
}
.time_spans_choice:hover{
cursor: pointer;
color: dodgerblue;
}

View File

@ -1,91 +1,101 @@
var express = require('express'); var express = require('express')
var router = express.Router(); var router = express.Router()
var sqlite3 = require('sqlite3'); var sqlite3 = require('sqlite3')
var Masto = require('mastodon'); var Masto = require('mastodon')
// import accounts_to_select from '../src/configs.mjs' // import accounts_to_select from '../src/configs.mjs'
const accounts_to_select = [ const accounts_to_select = [
{ {
label: "tykayn", label: 'tykayn',
value: "tykayn", value: 'tykayn',
src : "https://mastodon.cipherbliss.com/system/accounts/avatars/000/000/001/original/6388tykayn.gif" src: 'https://mastodon.cipherbliss.com/system/accounts/avatars/000/000/001/original/6388tykayn.gif'
}, },
{ {
label: "modominem", label: 'modominem',
value: "modominem", value: 'modominem',
src : "https://mastodon.cipherbliss.com/system/accounts/avatars/000/152/770/original/c62bb94381dc1f75.png" src: 'https://mastodon.cipherbliss.com/system/accounts/avatars/000/152/770/original/c62bb94381dc1f75.png'
}, },
{ {
label: "qzine", label: 'qzine',
value: "qzine", value: 'qzine',
src :"https://mastodon.cipherbliss.com/system/accounts/avatars/000/003/032/original/2bb8b90d21d3fdca.jpg" src: 'https://mastodon.cipherbliss.com/system/accounts/avatars/000/003/032/original/2bb8b90d21d3fdca.jpg'
}, },
{ {
label: "curator", label: 'curator',
value: "curator", value: 'curator',
src : "https://mastodon.cipherbliss.com/system/accounts/avatars/000/002/974/original/8e48623291e49afe.jpg" src: 'https://mastodon.cipherbliss.com/system/accounts/avatars/000/002/974/original/8e48623291e49afe.jpg'
}, },
{ {
label: "kurator", label: 'kurator',
value: "kurator", value: 'kurator',
src : "https://mastodon.cipherbliss.com/system/accounts/avatars/000/162/067/original/bb374d2c6a361b6d.jpg" src: 'https://mastodon.cipherbliss.com/system/accounts/avatars/000/162/067/original/bb374d2c6a361b6d.jpg'
}, },
{ {
label: "voix du nucléaire", label: 'voix du nucléaire',
value: "voixdunucleaire", value: 'voixdunucleaire',
src : "https://mastodon.cipherbliss.com/system/accounts/avatars/000/107/055/original/7dac1a35f1423b94.jpg" src: 'https://mastodon.cipherbliss.com/system/accounts/avatars/000/107/055/original/7dac1a35f1423b94.jpg'
}, },
{ {
label: "The greatest Meme", label: 'The greatest Meme',
value: "meme", value: 'meme',
src : "https://mastodon.cipherbliss.com/system/accounts/avatars/000/002/978/original/b2f2e817572c93e9.png" src: 'https://mastodon.cipherbliss.com/system/accounts/avatars/000/002/978/original/b2f2e817572c93e9.png'
}, },
{ {
label: "cil de gometz", label: 'cil de gometz',
value: "cil_gometz", value: 'cil_gometz',
src : "https://mastodon.cipherbliss.com/system/accounts/avatars/000/107/055/original/7dac1a35f1423b94.jpg" src: 'https://mastodon.cipherbliss.com/system/accounts/avatars/000/107/055/original/7dac1a35f1423b94.jpg'
}, },
] ]
// change this object to fit your multi accounts // change this object to fit your multi accounts
const default_times = ['08:02:00', '08:42:00', '09:10:00', '09:15:00', '10:22:00', '12:22:00'] const time_spans_choices = ['08:02:00', '08:42:00', '09:10:00', '09:15:00', '10:22:00', '12:22:00', '13:02:00', '14:01:00', '14:34:00', '16:10:00', '17:15:00', '17:48:00']
const database_masto = "mastodon_multi_accounts.db" const database_masto = 'mastodon_multi_accounts.db'
/* GET home page. */ /* GET home page. */
let schedule_time = ''; let schedule_time = ''
let schedule_day = new Date()
schedule_day = schedule_day.toISOString()
router.get('/', function (req, res, next) { router.get('/', function (req, res, next) {
if (!req.body.schedule_time) { if (!req.body.schedule_time) {
schedule_time = default_times[Math.floor(Math.random() * default_times.length)]; schedule_time = time_spans_choices[Math.floor(Math.random() * time_spans_choices.length)]
} }
res.render('index', {accounts_to_select, reqBody: req.body, schedule_time}); let contentVars =
}); {
accounts_to_select,
reqBody: req.body,
schedule_time,
schedule_day,
time_spans_choices
}
res.render('index',
contentVars
)
})
// publier un message avec un certain compte // publier un message avec un certain compte
router.get('/publish', function (req, res, next) { router.get('/publish', function (req, res, next) {
res.render('index', {title: 'Express'}); res.render('index', { title: 'Express' })
}); })
const connect = require('@databases/sqlite')
const { sql } = require('@databases/sqlite')
const { runOnChangeOnly } = require('nodemon/lib/config/defaults')
const fs = require('fs')
const connect = require('@databases/sqlite'); const db = connect(database_masto)
const {sql} = require('@databases/sqlite');
const {runOnChangeOnly} = require("nodemon/lib/config/defaults");
const fs = require("fs");
const db = connect(database_masto); function createDatabase () {
var newdb = new sqlite3.Database(database_masto, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (err) => {
createTables(newdb)
function createDatabase() { })
var newdb = new sqlite3.Database(database_masto, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (err) => {
createTables(newdb);
})
} }
function createTables(newdb) { function createTables (newdb) {
async function prepare() { async function prepare () {
await db.query(sql` await db.query(sql`
create table posts_scheduled create table posts_scheduled
( (
action_id integer action_id integer
@ -103,128 +113,123 @@ function createTables(newdb) {
insert into posts_scheduled insert into posts_scheduled
values (NULL, "modominem", "un message d'example", NULL); values (NULL, "modominem", "un message d'example", NULL);
`); `)
console.log('requête de création faite') console.log('requête de création faite')
} }
const prepared = prepare(); const prepared = prepare()
} }
// ajouter un message à la file d'attente avec un certain compte // ajouter un message à la file d'attente avec un certain compte
router.post('/add-to-queue', function (req, res, next) { router.post('/add-to-queue', function (req, res, next) {
// get account // get account
// get content* // get content*
// add to sql DB // add to sql DB
// insert into posts_scheduled // insert into posts_scheduled
// values (NULL, "modominem", "un message d'example", NULL); // values (NULL, "modominem", "un message d'example", NULL);
var db = new sqlite3.Database(database_masto, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (err) => { var db = new sqlite3.Database(database_masto, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (err) => {
} }
) )
db.serialize(() => { db.serialize(() => {
db.run('INSERT INTO posts_scheduled VALUES(?,?,?,?,?)', [null, req.body.author, req.body.message, req.body.fichier, null], function (err) { db.run('INSERT INTO posts_scheduled VALUES(?,?,?,?,?)', [null, req.body.author, req.body.message, req.body.fichier, null], function (err) {
if (err) { if (err) {
return console.log(err.message); return console.log(err.message)
res.render('index', {message: 'erreur ' + err.message}); res.render('index', { message: 'erreur ' + err.message })
} }
console.log("nouveau post ajouté", req.body.author, req.body.message); console.log('nouveau post ajouté', req.body.author, req.body.message)
res.render('index', {message: 'message ajouté OK'}); res.render('index', { message: 'message ajouté OK' })
}); })
}); })
})
}); function getAllPosts (db) {
return db.query(sql`SELECT *
function getAllPosts(db) {
return db.query(sql`SELECT *
FROM posts_scheduled FROM posts_scheduled
ORDER BY action_id DESC LIMIT 15;`) ORDER BY action_id DESC LIMIT 15;`)
} }
router.get('/init-db', function (req, res, next) { router.get('/init-db', function (req, res, next) {
var db = new sqlite3.Database(database_masto, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (err) => { var db = new sqlite3.Database(database_masto, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (err) => {
console.log('got to create db') console.log('got to create db')
createDatabase() createDatabase()
} }
) )
res.render('created_db', {}); res.render('created_db', {})
}); })
router.get('/list', function (req, res, next) { router.get('/list', function (req, res, next) {
// let posts_list = [{ // let posts_list = [{
// action_id: 1, // action_id: 1,
// post_username: "modominem", // post_username: "modominem",
// content: "demo post list", // content: "demo post list",
// medias: "media file name from assets folder", // medias: "media file name from assets folder",
// date_schedule: "2022-07-07 " // date_schedule: "2022-07-07 "
// }] // }]
getAllPosts(db).then(
(results) => {
console.log("liste de posts ", results)
res.render('database', {posts_list: results});
},
(err) => console.error(err),
);
});
getAllPosts(db).then(
(results) => {
console.log('liste de posts ', results)
res.render('database', { posts_list: results })
},
(err) => console.error(err),
)
})
router.get('/add-example', function (req, res, next) { router.get('/add-example', function (req, res, next) {
// let db = connect(database_masto); // let db = connect(database_masto);
async function prepare() { async function prepare () {
await db.query(sql` await db.query(sql`
insert into posts_scheduled insert into posts_scheduled
values (NULL, "modominem", "un message d'example", "image.jpg", NULL) values (NULL, "modominem", "un message d'example", "image.jpg", NULL)
; ;
`).then(resp => { `).then(resp => {
console.log(resp) console.log(resp)
let posts_list = [] let posts_list = []
res.redirect('/list') res.redirect('/list')
}, },
err => { err => {
console.log(err) console.log(err)
}); })
} }
const prepared = prepare(); const prepared = prepare()
} }
); )
require('dotenv').config();
// publier le message en db dans la file // publier le message en db dans la file
router.get('/publish-last-entry', function (req, res, next) { router.get('/publish-last-entry', function (req, res, next) {
var OAuth2 = require('oauth').OAuth2; var OAuth2 = require('oauth').OAuth2
// console.log('process.env' , process.env) // console.log('env' , env)
var oauth = new OAuth2(process.env.APP_ID, process.env.SECRET, process.env.INSTANCE_MASTODON, null, '/oauth/token'); var oauth = new OAuth2(env.APP_ID, env.SECRET, env.INSTANCE_MASTODON, null, '/oauth/token')
var url = oauth.getAuthorizeUrl({ var url = oauth.getAuthorizeUrl({
redirect_uri: 'urn:ietf:wg:oauth:2.0:oob', redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
response_type: 'code', response_type: 'code',
scope: 'read write follow' scope: 'read write follow'
}); })
console.log('url ', url) console.log('url ', url)
let status = "#mastoart of @tykayn" let status = '#mastoart of @tykayn'
let visibility = "unlisted" // public, unlisted, private, direct. let visibility = 'unlisted' // public, unlisted, private, direct.
let media_filename = "colline.JPG" let media_filename = 'colline.JPG'
let file_path = "assets/not_published/" + media_filename let file_path = 'assets/not_published/' + media_filename
let accessToken = process.env.TOKEN let accessToken = env.TOKEN
let sensitive = false; let sensitive = false
let scheduled_at = "2022-07-07T21:36:29.100Z"; let scheduled_at = '2022-07-07T21:36:29.100Z'
let account_id = "2974"; // curator bliss let account_id = '2974' // curator bliss
let language = "fr"; let language = 'fr'
let enable_post = false; let enable_post = false
// Get the user to open up the url in their browser and get the code // Get the user to open up the url in their browser and get the code
// oauth.getOAuthAccessToken('code from the authorization page that user should paste into your app', // oauth.getOAuthAccessToken('code from the authorization page that user should paste into your app',
@ -233,82 +238,48 @@ router.get('/publish-last-entry', function (req, res, next) {
// //
// console.log(err, accessToken, refreshToken , res); // console.log(err, accessToken, refreshToken , res);
const masto = new Masto({ const masto = new Masto({
access_token: accessToken, access_token: accessToken,
api_url: process.env.INSTANCE_MASTODON + '/api/v1/', api_url: env.parsed.INSTANCE_MASTODON + '/api/v1/',
}); })
if (enable_post) { if (enable_post) {
masto.post('media', { file: fs.createReadStream(file_path) }).then(resp => {
id = resp.data.id
// doc https://docs.joinmastodon.org/methods/statuses/
masto.post('media', {file: fs.createReadStream(file_path)}).then(resp => { console.log('media id ', resp.data.id)
id = resp.data.id; console.log(resp.data)
// doc https://docs.joinmastodon.org/methods/statuses/ masto.post('statuses', {
status: status,
media_ids: [id],
account_id,
visibility,
language,
sensitive
}).then(resp => {
// succès, marquer le post comme fait en BDD
console.log(resp)
console.log('media id ', resp.data.id) var oldPath = file_path
console.log(resp.data) var newPath = 'assets/published/' + media_filename
masto.post('statuses', {
status: status,
media_ids: [id],
account_id,
visibility,
language,
sensitive
}).then(resp => {
// succès, marquer le post comme fait en BDD
console.log(resp)
var oldPath = file_path fs.rename(oldPath, newPath, function (err) {
var newPath = 'assets/published/' + media_filename if (err) throw err
console.log('Successfully renamed - AKA moved!')
})
fs.rename(oldPath, newPath, function (err) { },
if (err) throw err err => {
console.log('Successfully renamed - AKA moved!') console.error(err)
}) })
})
}
}, res.render('index', {})
err => {
console.error(err)
})
})
}
//
// if (!file) {
// return masto.post('statuses', {
// status,
// visibility,
// });
// }
// const response = await masto.post('media', { })
// file: {
// value: file,
// options: {
// filename: 'assets/test.png',
// contentType: 'image/png',
// },
// },
// });
//
// return masto.post('statuses', {
// status,
// visibility,
// media_ids: [response.data.id],
// });
// })
res.render('index', {});
//
// getAllPosts(db).then(
// (results) => {
// console.log( "publier le premier message de la file d'attente" ,results[0])
// res.render('publish', {p: results[0]});
// },
// (err) => console.error(err),
// );
});
// répartir les publications dans le temps // répartir les publications dans le temps
// TODO // TODO
@ -316,73 +287,86 @@ const limit_posts_per_day = 10
router.get('/dispatch-publication-in-time', function (req, res, next) { router.get('/dispatch-publication-in-time', function (req, res, next) {
getAllPosts(db).then( getAllPosts(db).then(
(results) => { (results) => {
console.log("répartir", results[0]) console.log('répartir', results[0])
// on compte les posts et quel intervalle de temps mettre entre chaque pour tenir le rythme de X posts par jour // on compte les posts et quel intervalle de temps mettre entre chaque pour tenir le rythme de X posts par jour
res.render('index', {p: results[0]}); res.render('index', { p: results[0] })
}, },
(err) => console.error(err), (err) => console.error(err),
); )
});
})
router.post('/direct-post', function (req, res, next) { router.post('/direct-post', function (req, res, next) {
if (process.env['TOKEN_' + req.body.author]) { let env = require('dotenv').config({ path: __dirname + '/../.env' })
console.log('dotenv', env)
let visibility = 'public'; // console.log('req', req)
let language = 'fr'; console.log('req.body', req.body)
let sensitive = false;
let accessToken = process.env['TOKEN_' + req.body.author] let author = req.body.author.toUpperCase()
console.log('accessToken', accessToken) console.log('vérif token pour', author)
const masto = new Masto({ let access_token = env.parsed['TOKEN_' + author]
access_token: accessToken,
api_url: process.env.INSTANCE_MASTODON + '/api/v1/',
});
let params = { console.log('token', access_token)
status: req.body.message, if (access_token) {
visibility,
language,
sensitive
}
if (req.body.cw) {
params['spoiler_text'] = req.body.cw
}
if (req.body.scheduled_at && req.body.scheduled_at_bool) {
let dateschedule = new Date(req.body.scheduled_at)
params['scheduled_at'] = dateschedule.toISOString()
}
console.log(req.body)
if (!req.body.fichier) { let visibility = 'public'
let language = 'fr'
let sensitive = false
masto.post('statuses', params).then(rep => { console.log('accessToken', access_token)
console.log('rep', rep) const masto = new Masto({
}, err => { access_token: access_token,
console.error(err) api_url: env.parsed.INSTANCE_MASTODON + '/api/v1/',
}) })
res.render('index', {bodyReq: req.body})
}
// if (req.body.fichier) { let params = {
// status: req.body.message,
// masto.post('statuses', params).then(rep => { visibility,
// console.log('rep', rep) language,
// }, err => { sensitive
// console.error(err) }
// }) if (req.body.cw) {
// res.render('index', {bodyReq: req.body}) params['spoiler_text'] = req.body.cw
// } }
if (req.body.scheduled_at && req.body.scheduled_at_bool) {
let dateschedule = new Date(req.body.scheduled_at)
params['scheduled_at'] = dateschedule.toISOString()
console.log('scheduled_at', params['scheduled_at'])
return
}
console.log(req.body)
} else { if (!req.body.fichier) {
console.error('pas de token pour ' + req.body.author)
} masto.post('statuses', params).then(rep => {
console.log('rep', rep)
console.log('\n message bien envoyé')
}, err => {
console.error(err)
})
res.render('index', { bodyReq: req.body })
}
// TODO prise en charge des fichiers joints
// if (req.body.fichier) {
//
// masto.post('statuses', params).then(rep => {
// console.log('rep', rep)
// }, err => {
// console.error(err)
// })
// res.render('index', {bodyReq: req.body})
// }
} else {
console.error('pas de token pour ' + req.body.author)
}
}) })
module.exports = router; module.exports = router

View File

@ -32,15 +32,26 @@ block content
span Quavez-vous en tête? span Quavez-vous en tête?
textarea.main-input.autosuggest-textarea__textarea(name="message", width="500", lines="20",autofocus="autofocus") textarea.main-input.autosuggest-textarea__textarea(name="message", width="500", lines="20",autofocus="autofocus")
br br
label
span Fichier à joindre (optionnel)
textarea.file-input.autosuggest-textarea__textarea(name="fichier", width="500", lines="1",value="default_picture.jpg")
fieldset.wip fieldset.wip
label Schedule in time (work in progress, not working by now) label
span Fichier à joindre (optionnel)
input.file-input.autosuggest-textarea__textarea(name="fichier", type="file")
h2 schedule
label Select day in the future
div.day_spans
each val, index in [1,2,3,4,5]
div.clickable(onclick=`selectDay('${val}')`)
span.time_spans_choice=val
label Select time span
div.time_spans
each val, index in time_spans_choices
div.clickable(onclick=`selectTime('${val}')`)
span.time_spans_choice=val
label Schedule in time (work in progress)
input.input.checkbox(type="checkbox", value=false, name="scheduled_at_bool") input.input.checkbox(type="checkbox", value=false, name="scheduled_at_bool")
input.input.checkbox(type="date", name="scheduled_at") input.input.checkbox(type="date", name="scheduled_at", value=schedule_day)
input.input.checkbox(type="text", name="scheduled_at_time",value=schedule_time) input.input.checkbox(type="text", id="scheduled_at_time", name="scheduled_at_time",value=schedule_time)
//div(id=flatpickr)
br br
div.composer--publisher div.composer--publisher
//input.button.primary(type="submit", value="ajouter à la file d'attente") //input.button.primary(type="submit", value="ajouter à la file d'attente")
@ -57,5 +68,14 @@ block content
},500) },500)
console.log('account changed', somePseudo) console.log('account changed', somePseudo)
} }
function selectTime(someTime){
let selector=document.querySelector('#scheduled_at_time');
selector.value = someTime
selector.classList.add("changed")
setTimeout(()=>{
selector.classList.remove("changed")
},500)
console.log('account changed', somePseudo)
}
console.log('script loaded') console.log('script loaded')

6927
yarn.lock

File diff suppressed because it is too large Load Diff