Compare commits

..

5 Commits
dev ... master

Author SHA1 Message Date
Matthew 77213c0178 commit package-lock.json 2023-02-23 16:12:13 -05:00
Matthew d5f0346f75 Merge branch 'dev' 2023-02-21 13:09:42 -05:00
Matthew 81e7f3cc14 update eval code 2023-02-12 13:16:04 -05:00
Matthew 4f07d6ece2 wait for mongoose to connect 2023-02-12 00:36:22 -05:00
Matthew d696dcf804 update deps x2 2023-02-11 23:59:07 -05:00
4 changed files with 108 additions and 29 deletions

128
package-lock.json generated
View File

@ -27,7 +27,7 @@
"express": "^4.17.1", "express": "^4.17.1",
"helmet": "^4.6.0", "helmet": "^4.6.0",
"ioredis": "^4.28.2", "ioredis": "^4.28.2",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^9.0.0",
"mathjs": "^10.0.0", "mathjs": "^10.0.0",
"moment": "^2.29.1", "moment": "^2.29.1",
"mongoose": "^6.1.1", "mongoose": "^6.1.1",
@ -2298,6 +2298,54 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/auth0/node_modules/jsonwebtoken": {
"version": "8.5.1",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
"integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
"dependencies": {
"jws": "^3.2.2",
"lodash.includes": "^4.3.0",
"lodash.isboolean": "^3.0.3",
"lodash.isinteger": "^4.0.4",
"lodash.isnumber": "^3.0.3",
"lodash.isplainobject": "^4.0.6",
"lodash.isstring": "^4.0.1",
"lodash.once": "^4.0.0",
"ms": "^2.1.1",
"semver": "^5.6.0"
},
"engines": {
"node": ">=4",
"npm": ">=1.4.28"
}
},
"node_modules/auth0/node_modules/jwa": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"dependencies": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
},
"node_modules/auth0/node_modules/jws": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
"dependencies": {
"jwa": "^1.4.1",
"safe-buffer": "^5.0.1"
}
},
"node_modules/auth0/node_modules/semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/available-typed-arrays": { "node_modules/available-typed-arrays": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
@ -5147,24 +5195,18 @@
} }
}, },
"node_modules/jsonwebtoken": { "node_modules/jsonwebtoken": {
"version": "8.5.1", "version": "9.0.0",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz",
"integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==",
"dependencies": { "dependencies": {
"jws": "^3.2.2", "jws": "^3.2.2",
"lodash.includes": "^4.3.0", "lodash": "^4.17.21",
"lodash.isboolean": "^3.0.3",
"lodash.isinteger": "^4.0.4",
"lodash.isnumber": "^3.0.3",
"lodash.isplainobject": "^4.0.6",
"lodash.isstring": "^4.0.1",
"lodash.once": "^4.0.0",
"ms": "^2.1.1", "ms": "^2.1.1",
"semver": "^5.6.0" "semver": "^7.3.8"
}, },
"engines": { "engines": {
"node": ">=4", "node": ">=12",
"npm": ">=1.4.28" "npm": ">=6"
} }
}, },
"node_modules/jsonwebtoken/node_modules/jwa": { "node_modules/jsonwebtoken/node_modules/jwa": {
@ -5186,14 +5228,6 @@
"safe-buffer": "^5.0.1" "safe-buffer": "^5.0.1"
} }
}, },
"node_modules/jsonwebtoken/node_modules/semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/jsprim": { "node_modules/jsprim": {
"version": "1.4.2", "version": "1.4.2",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
@ -5243,6 +5277,54 @@
"follow-redirects": "^1.14.0" "follow-redirects": "^1.14.0"
} }
}, },
"node_modules/jwks-rsa/node_modules/jsonwebtoken": {
"version": "8.5.1",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
"integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
"dependencies": {
"jws": "^3.2.2",
"lodash.includes": "^4.3.0",
"lodash.isboolean": "^3.0.3",
"lodash.isinteger": "^4.0.4",
"lodash.isnumber": "^3.0.3",
"lodash.isplainobject": "^4.0.6",
"lodash.isstring": "^4.0.1",
"lodash.once": "^4.0.0",
"ms": "^2.1.1",
"semver": "^5.6.0"
},
"engines": {
"node": ">=4",
"npm": ">=1.4.28"
}
},
"node_modules/jwks-rsa/node_modules/jwa": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"dependencies": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
},
"node_modules/jwks-rsa/node_modules/jws": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
"dependencies": {
"jwa": "^1.4.1",
"safe-buffer": "^5.0.1"
}
},
"node_modules/jwks-rsa/node_modules/semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/jws": { "node_modules/jws": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz",
@ -6356,7 +6438,7 @@
"version": "17.1.3", "version": "17.1.3",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-17.1.3.tgz", "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-17.1.3.tgz",
"integrity": "sha512-tVtvNSOOqlq75rUgwLeDAEQoLIiBqmRg0/zedpI6fuqIocIkuxG23A7FIl1oVSkuSMMLgcOP5kVhNETmsmjvPw==", "integrity": "sha512-tVtvNSOOqlq75rUgwLeDAEQoLIiBqmRg0/zedpI6fuqIocIkuxG23A7FIl1oVSkuSMMLgcOP5kVhNETmsmjvPw==",
"deprecated": "< 18.1.0 is no longer supported", "deprecated": "< 19.2.0 is no longer supported",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"cross-fetch": "3.1.5", "cross-fetch": "3.1.5",

View File

@ -7,7 +7,7 @@
"lint": "eslint -c ./.eslintrc.json src --ext ts" "lint": "eslint -c ./.eslintrc.json src --ext ts"
}, },
"repository": "https://gitlab.libraryofcode.org/engineering/communityrelations.git", "repository": "https://gitlab.libraryofcode.org/engineering/communityrelations.git",
"author": "Library of Code | Dept. of Engineering <engineering@libraryofcode.org>", "author": "Matthew R, AD, FSEN <matthew@staff.libraryofcode.org>",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"devDependencies": { "devDependencies": {
"@types/ari-client": "^2.2.7", "@types/ari-client": "^2.2.7",
@ -42,7 +42,6 @@
"axios": "^0.24.0", "axios": "^0.24.0",
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"bull": "^4.1.1", "bull": "^4.1.1",
"cheerio": "^1.0.0-rc.10",
"cr-db": "git+https://gitlab.libraryofcode.org/engineering/community-relations/database.git", "cr-db": "git+https://gitlab.libraryofcode.org/engineering/community-relations/database.git",
"cron": "^1.8.2", "cron": "^1.8.2",
"eris": "^0.16.1", "eris": "^0.16.1",
@ -57,7 +56,6 @@
"nanoid": "^3.1.30", "nanoid": "^3.1.30",
"nodemailer": "^6.7.2", "nodemailer": "^6.7.2",
"pluris": "^0.3.7", "pluris": "^0.3.7",
"puppeteer": "^17.1.3",
"sd-notify": "^2.8.0", "sd-notify": "^2.8.0",
"signale": "^1.4.0", "signale": "^1.4.0",
"stock-info": "^1.5.1", "stock-info": "^1.5.1",

View File

@ -77,8 +77,7 @@ export default class Client extends eris.Client {
} }
public async loadDatabase() { public async loadDatabase() {
mongoose.connect(this.config.mongoDB, { await mongoose.connect(this.config.mongoDB, {
minPoolSize: 50,
}); });
const statMessages = await this.db.mongo.Stat.findOne({ name: 'messages' }); const statMessages = await this.db.mongo.Stat.findOne({ name: 'messages' });

View File

@ -60,6 +60,6 @@ export default class Eval extends Command {
} }
} }
return display.forEach((m) => ctx.message.channel.createMessage(`\`\`\`js\n${m}\n\`\`\``)); return display.forEach((m) => ctx.uniCreateMessage(`\`\`\`js\n${m}\n\`\`\``));
} }
} }