mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-15 01:49:10 +00:00
modernize dependencies
This commit is contained in:
parent
ea51d94c16
commit
5a1fc526db
22 changed files with 8578 additions and 22658 deletions
|
@ -8,6 +8,7 @@ const _io = require('socket.io')
|
|||
const path = require('path')
|
||||
const router = require('koa-better-router')().loadMethods()
|
||||
const Roleypoly = require('./Roleypoly')
|
||||
const ksuid = require('ksuid')
|
||||
|
||||
// monkey patch async-reduce because F U T U R E
|
||||
Array.prototype.areduce = async function (predicate, acc = []) { // eslint-disable-line
|
||||
|
@ -88,7 +89,8 @@ async function start () {
|
|||
key: 'roleypoly:sess',
|
||||
maxAge: 'session',
|
||||
siteOnly: true,
|
||||
store: M.ctx.sessions
|
||||
store: M.ctx.sessions,
|
||||
genid: () => { return ksuid.randomSync().string }
|
||||
}, app))
|
||||
|
||||
await M.mountRoutes()
|
||||
|
|
4717
Server/package-lock.json
generated
4717
Server/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -9,30 +9,30 @@
|
|||
"pm2": "pm2"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^2.3.0",
|
||||
"discord.js": "^11.2.1",
|
||||
"dotenv": "^4.0.0",
|
||||
"chalk": "^2.4.1",
|
||||
"discord.js": "^11.4.2",
|
||||
"dotenv": "^6.1.0",
|
||||
"erlpack": "github:discordapp/erlpack",
|
||||
"eslint": "^4.14.0",
|
||||
"eslint-config-standard": "^11.0.0-beta.0",
|
||||
"glob": "^7.1.2",
|
||||
"eslint": "^5.8.0",
|
||||
"eslint-config-standard": "^12.0.0",
|
||||
"glob": "^7.1.3",
|
||||
"immutable": "^3.8.2",
|
||||
"koa": "^2.4.1",
|
||||
"koa": "^2.6.1",
|
||||
"koa-better-router": "^2.1.1",
|
||||
"koa-bodyparser": "^4.2.0",
|
||||
"koa-send": "^4.1.2",
|
||||
"koa-session": "^5.5.1",
|
||||
"koa-compress": "^2.0.0",
|
||||
"koa-static": "^4.0.2",
|
||||
"ksuid": "^0.4.0",
|
||||
"lru-cache": "^4.1.1",
|
||||
"pg": "^7.4.0",
|
||||
"koa-bodyparser": "^4.2.1",
|
||||
"koa-send": "^5.0.0",
|
||||
"koa-session": "^5.10.0",
|
||||
"koa-compress": "^3.0.0",
|
||||
"koa-static": "^5.0.0",
|
||||
"ksuid": "^1.1.3",
|
||||
"lru-cache": "^4.1.3",
|
||||
"pg": "^7.6.0",
|
||||
"pg-hstore": "^2.3.2",
|
||||
"pm2": "^2.9.1",
|
||||
"sequelize": "^4.28.6",
|
||||
"socket.io": "^2.0.4",
|
||||
"superagent": "^3.8.2",
|
||||
"uuid": "^3.1.0",
|
||||
"uws": "^9.14.0"
|
||||
"pm2": "^2.9.3",
|
||||
"sequelize": "^4.41.0",
|
||||
"socket.io": "^2.1.1",
|
||||
"superagent": "^4.0.0-beta.5",
|
||||
"uuid": "^3.3.2",
|
||||
"uws": "10.148.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ class SessionsService extends Service {
|
|||
this.Session = ctx.M.Session
|
||||
}
|
||||
|
||||
async get (id) {
|
||||
async get (id, {rolling}) {
|
||||
const user = await this.Session.findOne({ where: { id } })
|
||||
|
||||
if (user === null) {
|
||||
|
@ -16,12 +16,14 @@ class SessionsService extends Service {
|
|||
return user.data
|
||||
}
|
||||
|
||||
async set (id, data, maxAge) {
|
||||
async set (id, data, {maxAge, rolling, changed}) {
|
||||
let session = await this.Session.findOne({ where: { id } })
|
||||
if (session === null) {
|
||||
session = this.Session.build({ id })
|
||||
}
|
||||
|
||||
console.log(maxAge)
|
||||
|
||||
session.data = data
|
||||
session.maxAge = maxAge
|
||||
|
||||
|
|
3128
Server/yarn.lock
3128
Server/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue