AQ update

This commit is contained in:
peter
2020-08-13 12:03:35 +02:00
parent bd5b33e4a1
commit 7c1b0b73ed
35 changed files with 1343 additions and 881 deletions
+2
View File
@@ -13,6 +13,8 @@ log.txt
*.d.ts
*.js
*.ts
log.txt
!src/**/*
node_modules
Binary file not shown.
@@ -11,28 +11,20 @@ exports.up = function (knex) {
output: process.stdout
})
return new Promise((res, rej) => {
r1.question('WARNING\n\nAbout to update your signups table. Please make sure there are no active signups. \nContinue? y/N', answer => {
if(!answer || answer === "" || answer === "n" || answer === "N"){
rej(new Error("User aborted"))
}else{
knex('signups').select('*').then(rows => {
return knex.schema.dropTable('signups').then(_ => {
return knex.schema.createTable('signups', function (table) {
table.increments('id').primary()
table.unique(['raidid', 'characterid'])
table.integer('raidid')
table.foreign('raidid').references('id').inTable('raids').onDelete('CASCADE')
table.integer('characterid')
table.foreign('characterid').references('id').inTable('characters').onDelete('CASCADE')
table.boolean('benched').defaultTo('false')
table.boolean('late')
table.timestamp('timestamp').defaultTo(knex.fn.now())
table.string('memo').nullable()
res()
}).catch(rej)
})
})
}
return knex.schema.dropTable('signups').then(_ => {
return knex.schema.createTable('signups', function (table) {
table.increments('id').primary()
table.unique(['raidid', 'characterid'])
table.integer('raidid')
table.foreign('raidid').references('id').inTable('raids').onDelete('CASCADE')
table.integer('characterid')
table.foreign('characterid').references('id').inTable('characters').onDelete('CASCADE')
table.boolean('benched').defaultTo('false')
table.boolean('late')
table.timestamp('timestamp').defaultTo(knex.fn.now())
table.string('memo').nullable()
res()
}).catch(rej)
})
})
}
+1 -1
View File
@@ -12,7 +12,7 @@ exports.up = function (knex) {
exports.down = function (knex) {
return knex.schema.table('signups', function (table) {
return knex.schema.table('items', function (table) {
table.dropColumn('stats')
})
}
+359 -289
View File
@@ -99,6 +99,14 @@
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"dev": true
},
"@types/engine.io": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/@types/engine.io/-/engine.io-3.1.4.tgz",
"integrity": "sha512-98rXVukLD6/ozrQ2O80NAlWDGA4INg+tqsEReWJldqyi2fulC9V7Use/n28SWgROXKm6003ycWV4gZHoF8GA6w==",
"requires": {
"@types/node": "*"
}
},
"@types/fs-extra": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.0.0.tgz",
@@ -131,9 +139,9 @@
"integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ=="
},
"@types/node": {
"version": "11.13.19",
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.19.tgz",
"integrity": "sha512-tLRDU1hmcWamtgRT2iVRdraAQVGFQGgtcqracSo9XyMN1VeZLSVGb8RJJxVqab7UGbijoUijGPVFMjmqzyZIUw=="
"version": "14.0.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.27.tgz",
"integrity": "sha512-kVrqXhbclHNHGu9ztnAwSncIgJv/FaxmzXJvGXNdcCpV1b8u1/Mi6z6m0vwy0LzKeXFTPLH0NzwmoJ3fNCIq0g=="
},
"@types/node-fetch": {
"version": "2.5.0",
@@ -143,6 +151,20 @@
"@types/node": "*"
}
},
"@types/socket.io": {
"version": "2.1.10",
"resolved": "https://registry.npmjs.org/@types/socket.io/-/socket.io-2.1.10.tgz",
"integrity": "sha512-1fQMaDU/x2LPljEI/QI5IKl8sBYHM/zv32YYKvNrVEor7/1+MLqMqmWt8Bb8Vpf+PlIPBiTTC0BnrRx7ju3xOw==",
"requires": {
"@types/engine.io": "*",
"@types/node": "*"
}
},
"@types/socket.io-client": {
"version": "1.4.33",
"resolved": "https://registry.npmjs.org/@types/socket.io-client/-/socket.io-client-1.4.33.tgz",
"integrity": "sha512-m4LnxkljsI9fMsjwpW5QhRpMixo2BeeLpFmg0AE+sS4H1pzAd/cs/ftTiL60FLZgfFa8PFRPx5KsHu8O0bADKQ=="
},
"@typescript-eslint/typescript-estree": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.17.0.tgz",
@@ -218,10 +240,16 @@
"negotiator": "0.6.2"
}
},
"after": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz",
"integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8="
},
"ajv": {
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
"dev": true,
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -349,18 +377,10 @@
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
"requires": {
"safer-buffer": "~2.1.0"
}
},
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
"arraybuffer.slice": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
"integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog=="
},
"assign-symbols": {
"version": "1.0.0",
@@ -381,25 +401,20 @@
"lodash": "^4.17.14"
}
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
"async-limiter": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
},
"atob": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz",
"integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug=="
"backo2": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
"integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc="
},
"balanced-match": {
"version": "1.0.0",
@@ -456,12 +471,22 @@
}
}
},
"bcrypt-pbkdf": {
"base64-arraybuffer": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz",
"integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg="
},
"base64id": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
"integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog=="
},
"better-assert": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz",
"integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=",
"requires": {
"tweetnacl": "^0.14.3"
"callsite": "1.0.0"
}
},
"big.js": {
@@ -476,6 +501,11 @@
"integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
"dev": true
},
"blob": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
"integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig=="
},
"bluebird": {
"version": "3.5.5",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz",
@@ -645,17 +675,17 @@
"unset-value": "^1.0.0"
}
},
"callsite": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
"integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA="
},
"camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
@@ -840,14 +870,6 @@
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.1.0.tgz",
"integrity": "sha512-6S062WDQUXi6hOfkO/sBPVwE5ASXY4G2+b4atvhJfSsuUUhIaUKlkjLe9692Ipyt5/a+IPF5aVTu3V5gvXq5cg=="
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
@@ -860,11 +882,21 @@
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
"dev": true
},
"component-bind": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
"integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E="
},
"component-emitter": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
"integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
},
"component-inherit": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
"integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -993,14 +1025,6 @@
"integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=",
"dev": true
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"date-format": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz",
@@ -1099,11 +1123,6 @@
}
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
@@ -1274,15 +1293,6 @@
"stream-shift": "^1.0.0"
}
},
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"requires": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
}
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -1314,6 +1324,66 @@
"once": "^1.4.0"
}
},
"engine.io": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.4.2.tgz",
"integrity": "sha512-b4Q85dFkGw+TqgytGPrGgACRUhsdKc9S9ErRAXpPGy/CXKs4tYoHDkvIRdsseAF7NjfVwjRFIn6KTnbw7LwJZg==",
"requires": {
"accepts": "~1.3.4",
"base64id": "2.0.0",
"cookie": "0.3.1",
"debug": "~4.1.0",
"engine.io-parser": "~2.2.0",
"ws": "^7.1.2"
},
"dependencies": {
"cookie": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
"integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
}
}
},
"engine.io-client": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.3.tgz",
"integrity": "sha512-0NGY+9hioejTEJCaSJZfWZLk4FPI9dN+1H1C4+wj2iuFba47UgZbJzfWs4aNFajnX/qAaYKbe2lLTfEEWzCmcw==",
"requires": {
"component-emitter": "~1.3.0",
"component-inherit": "0.0.3",
"debug": "~4.1.0",
"engine.io-parser": "~2.2.0",
"has-cors": "1.1.0",
"indexof": "0.0.1",
"parseqs": "0.0.5",
"parseuri": "0.0.5",
"ws": "~6.1.0",
"xmlhttprequest-ssl": "~1.5.4",
"yeast": "0.1.2"
},
"dependencies": {
"ws": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz",
"integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==",
"requires": {
"async-limiter": "~1.0.0"
}
}
}
},
"engine.io-parser": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.0.tgz",
"integrity": "sha512-6I3qD9iUxotsC5HEMuuGsKA0cXerGz+4uGcXQEkfBidgKf0amsjrrtwcbwK/nzpZBxclXlV7gGl9dgWvu4LF6w==",
"requires": {
"after": "0.8.2",
"arraybuffer.slice": "~0.0.7",
"base64-arraybuffer": "0.1.5",
"blob": "0.0.5",
"has-binary2": "~1.0.2"
}
},
"enhanced-resolve": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz",
@@ -1602,20 +1672,17 @@
}
}
},
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"fast-deep-equal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
"dev": true
},
"fast-json-stable-stringify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
"dev": true
},
"fast-levenshtein": {
"version": "2.0.6",
@@ -1829,21 +1896,6 @@
"for-in": "^1.0.1"
}
},
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
}
},
"forwarded": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
@@ -1892,6 +1944,13 @@
"path": "^0.12.7",
"rxjs": "^6.5.2",
"rxjs-compat": "^6.5.2"
},
"dependencies": {
"@types/node": {
"version": "11.15.20",
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.15.20.tgz",
"integrity": "sha512-DY2QwdrBqNlsxdMehwzUtSsWHgYYPLVCAuXvOcu3wkzYmchbRunQ7OEZFOrmFoBLfA1ysz2Ypr6vtNP9WQkUaQ=="
}
}
},
"frontblock-generic": {
@@ -2063,14 +2122,6 @@
"resolved": "https://registry.npmjs.org/getopts/-/getopts-2.2.5.tgz",
"integrity": "sha512-9jb7AW5p3in+IiJWhQiZmmwkpLaR/ccTWdWQCtZM66HJcHHLegowh4q4tSD7gouUyeNvFWRavfK9GXosQHDpFA=="
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"git-cherrypicker": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/git-cherrypicker/-/git-cherrypicker-0.0.3.tgz",
@@ -2213,20 +2264,6 @@
"integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
"dev": true
},
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
"integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
"requires": {
"ajv": "^6.5.5",
"har-schema": "^2.0.0"
}
},
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@@ -2235,6 +2272,26 @@
"function-bind": "^1.1.1"
}
},
"has-binary2": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
"integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==",
"requires": {
"isarray": "2.0.1"
},
"dependencies": {
"isarray": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
"integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
}
}
},
"has-cors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
"integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk="
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@@ -2311,16 +2368,6 @@
"toidentifier": "1.0.0"
}
},
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"requires": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
}
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -2370,6 +2417,11 @@
"integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=",
"dev": true
},
"indexof": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
"integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10="
},
"infer-owner": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",
@@ -2609,11 +2661,6 @@
"has-symbols": "^1.0.0"
}
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"is-unc-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
@@ -2662,11 +2709,6 @@
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"js-yaml": {
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
@@ -2677,25 +2719,11 @@
"esprima": "^4.0.0"
}
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true
},
"json5": {
"version": "1.0.1",
@@ -2714,17 +2742,6 @@
"graceful-fs": "^4.1.6"
}
},
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"verror": "1.10.0"
}
},
"key-file-storage": {
"version": "2.2.6",
"resolved": "https://registry.npmjs.org/key-file-storage/-/key-file-storage-2.2.6.tgz",
@@ -2829,6 +2846,28 @@
"path": "^0.12.7",
"rpclibrary": "^1.1.3",
"uuid": "^3.3.3"
},
"dependencies": {
"crypto-js": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz",
"integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg=="
},
"rpclibrary": {
"version": "1.12.3",
"resolved": "https://registry.npmjs.org/rpclibrary/-/rpclibrary-1.12.3.tgz",
"integrity": "sha512-jht9XEonyYD1pHRMFNUF/Opo91RA2Cu7e9sd5aRnLk19j5/UPJ6NPikCIwNHdXmVRS2rvC12kA9ytQatdt77NA==",
"requires": {
"@types/socket.io": "^2.1.8",
"@types/socket.io-client": "^1.4.33",
"bsock": "^0.1.9",
"crypto-js": "^4.0.0",
"http": "0.0.0",
"socket.io": "^2.3.0",
"socket.io-client": "^2.3.0",
"uuid": "^3.3.3"
}
}
}
},
"locate-path": {
@@ -3365,9 +3404,9 @@
"dev": true
},
"nan": {
"version": "2.14.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
"integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg=="
"version": "2.14.1",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
"integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw=="
},
"nanomatch": {
"version": "1.2.13",
@@ -3388,9 +3427,9 @@
}
},
"needle": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz",
"integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==",
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/needle/-/needle-2.5.0.tgz",
"integrity": "sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA==",
"requires": {
"debug": "^3.2.6",
"iconv-lite": "^0.4.4",
@@ -3479,9 +3518,9 @@
"integrity": "sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ=="
},
"nopt": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
"integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
"requires": {
"abbrev": "1",
"osenv": "^0.1.4"
@@ -3532,16 +3571,16 @@
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-component": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz",
"integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE="
},
"object-copy": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
@@ -3899,6 +3938,22 @@
"resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
"integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY="
},
"parseqs": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz",
"integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=",
"requires": {
"better-assert": "~1.0.0"
}
},
"parseuri": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz",
"integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=",
"requires": {
"better-assert": "~1.0.0"
}
},
"parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@@ -3964,11 +4019,6 @@
"pify": "^3.0.0"
}
},
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"pg-connection-string": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.1.0.tgz",
@@ -4128,11 +4178,6 @@
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"psl": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz",
"integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ=="
},
"pump": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
@@ -4169,7 +4214,8 @@
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true
},
"qs": {
"version": "6.7.0",
@@ -4278,40 +4324,6 @@
"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
},
"request": {
"version": "2.88.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
"integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.2",
"har-validator": "~5.1.0",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.4.3",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
},
"dependencies": {
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
}
}
},
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -4398,21 +4410,16 @@
}
},
"rpclibrary": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/rpclibrary/-/rpclibrary-1.10.2.tgz",
"integrity": "sha512-uf4FtylK+tyVo1O8YVihxYxaI4KHnKBzq05SsLYe8ZPXdO8Hqrv7Je5cwv3bfx0FBCO1vVrSc8DT1P6ypGY6uQ==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/rpclibrary/-/rpclibrary-2.0.1.tgz",
"integrity": "sha512-phdU0TkrnNVXdFa5PKkbWvn+MxocowvqalEUG1jfpkc1CoQkJ9AXa4OXSEu5r2a2IFhVauYva/qXv1em5yrHSg==",
"requires": {
"bsock": "^0.1.9",
"crypto-js": "^4.0.0",
"@types/socket.io": "^2.1.8",
"@types/socket.io-client": "^1.4.33",
"http": "0.0.0",
"socket.io": "^2.3.0",
"socket.io-client": "^2.3.0",
"uuid": "^3.3.3"
},
"dependencies": {
"crypto-js": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz",
"integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg=="
}
}
},
"run-queue": {
@@ -4723,6 +4730,104 @@
}
}
},
"socket.io": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.3.0.tgz",
"integrity": "sha512-2A892lrj0GcgR/9Qk81EaY2gYhCBxurV0PfmmESO6p27QPrUK1J3zdns+5QPqvUYK2q657nSj0guoIil9+7eFg==",
"requires": {
"debug": "~4.1.0",
"engine.io": "~3.4.0",
"has-binary2": "~1.0.2",
"socket.io-adapter": "~1.1.0",
"socket.io-client": "2.3.0",
"socket.io-parser": "~3.4.0"
}
},
"socket.io-adapter": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz",
"integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g=="
},
"socket.io-client": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.3.0.tgz",
"integrity": "sha512-cEQQf24gET3rfhxZ2jJ5xzAOo/xhZwK+mOqtGRg5IowZsMgwvHwnf/mCRapAAkadhM26y+iydgwsXGObBB5ZdA==",
"requires": {
"backo2": "1.0.2",
"base64-arraybuffer": "0.1.5",
"component-bind": "1.0.0",
"component-emitter": "1.2.1",
"debug": "~4.1.0",
"engine.io-client": "~3.4.0",
"has-binary2": "~1.0.2",
"has-cors": "1.1.0",
"indexof": "0.0.1",
"object-component": "0.0.3",
"parseqs": "0.0.5",
"parseuri": "0.0.5",
"socket.io-parser": "~3.3.0",
"to-array": "0.1.4"
},
"dependencies": {
"component-emitter": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
"integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
},
"isarray": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
"integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"socket.io-parser": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz",
"integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==",
"requires": {
"component-emitter": "1.2.1",
"debug": "~3.1.0",
"isarray": "2.0.1"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
}
}
}
}
},
"socket.io-parser": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz",
"integrity": "sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==",
"requires": {
"component-emitter": "1.2.1",
"debug": "~4.1.0",
"isarray": "2.0.1"
},
"dependencies": {
"component-emitter": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
"integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
},
"isarray": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
"integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
}
}
},
"source-list-map": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
@@ -4782,29 +4887,12 @@
"dev": true
},
"sqlite3": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.1.1.tgz",
"integrity": "sha512-CvT5XY+MWnn0HkbwVKJAyWEMfzpAPwnTiB3TobA5Mri44SrTovmmh499NPQP+gatkeOipqPlBLel7rn4E/PCQg==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.2.0.tgz",
"integrity": "sha512-roEOz41hxui2Q7uYnWsjMOTry6TcNUNmp8audCx18gF10P2NknwdpF+E+HKvz/F2NvPKGGBF4NGc+ZPQ+AABwg==",
"requires": {
"nan": "^2.12.1",
"node-pre-gyp": "^0.11.0",
"request": "^2.87.0"
}
},
"sshpk": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
"integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
"node-pre-gyp": "^0.11.0"
}
},
"ssri": {
@@ -5063,6 +5151,11 @@
"resolved": "https://registry.npmjs.org/tildify/-/tildify-2.0.0.tgz",
"integrity": "sha512-Cc+OraorugtXNfs50hU9KS369rFXCfgGLpfCfvlc+Ud5u6VWmUQsOAa9HbTvheQdYnrdJqqv1e5oIqXppMYnSw=="
},
"to-array": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz",
"integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA="
},
"to-object-path": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
@@ -5106,22 +5199,6 @@
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
},
"tough-cookie": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
"integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
"requires": {
"psl": "^1.1.24",
"punycode": "^1.4.1"
},
"dependencies": {
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
}
}
},
"trash": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/trash/-/trash-6.0.0.tgz",
@@ -5193,19 +5270,6 @@
"tslib": "^1.9.3"
}
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
},
"type-check": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
@@ -5349,6 +5413,7 @@
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
"integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
"dev": true,
"requires": {
"punycode": "^2.1.0"
}
@@ -5416,16 +5481,6 @@
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
},
"walkdir": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.4.1.tgz",
@@ -5528,6 +5583,11 @@
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz",
"integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA=="
},
"xdg-basedir": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz",
@@ -5575,6 +5635,11 @@
"resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz",
"integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw="
},
"xmlhttprequest-ssl": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
"integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4="
},
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
@@ -5630,6 +5695,11 @@
"lodash": "^4.17.15",
"yargs": "^13.3.0"
}
},
"yeast": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
"integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk="
}
}
}
+3 -2
View File
@@ -26,6 +26,7 @@
"license": "ISC",
"dependencies": {
"@types/mocha": "^5.2.7",
"@types/node": "^14.0.27",
"bsert": "0.0.10",
"bsock": "^0.1.9",
"child-process-promise": "^2.2.1",
@@ -47,10 +48,10 @@
"path": "^0.12.7",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.0",
"rpclibrary": "^1.10.2",
"rpclibrary": "^2.0.1",
"simple-git": "^1.124.0",
"spawn-sync": "^2.0.0",
"sqlite3": "^4.1.1",
"sqlite3": "^4.2.0",
"trash": "^6.0.0",
"tsyringe": "^4.0.1",
"upgiter": "^1.0.4",
+9 -5
View File
@@ -79,7 +79,7 @@ export class FrontworkAdmin
])
.catch(e => getLogger('Admin#stop').warn(e))
.finally(() => {
this.rpcServer.destroy()
this.rpcServer.close()
process.exit(0)
})
}
@@ -107,18 +107,22 @@ export class FrontworkAdmin
}
private startWebsocket() {
this.rpcServer = new RPCServer(20000, [
this.rpcServer = new RPCServer([
...this.frontworkComponents,
{
name: "debug",
exportRPCs: () => [{
RPCs: () => [{
name: 'dumpDb',
call: async (table) => await this.knex(table).select('*')
}]
}
], {
visibility: '0.0.0.0'
})
errorHandler: (sock, err, rpc, args) => {
console.log(rpc, err);
}
}).listen(20000)
getLogger('Admin#startWebsocket').debug("Websocket up on", 20000)
}
@@ -20,7 +20,7 @@ implements FrontworkComponent<CharacterManagerIfc, RPCInterface>, ICharacterMana
@Inject(IUserManager)
private loginManager : IUserManager
exportRPCs = () => [
RPCs = () => [
this.getSpecId,
this.getCharacterByName,
this.getCharacters,
@@ -30,8 +30,7 @@ implements FrontworkComponent<CharacterManagerIfc, RPCInterface>, ICharacterMana
this.getHeadCount
]
exportRPCFeatures = () => [
]
RPCFeatures = () => []
getTableDefinitions = (): TableDefiniton[] => [
{
+3 -3
View File
@@ -28,14 +28,14 @@ implements FrontworkComponent<GuildManagerIfc, GuildManagerFeatureIfc>, IGuildMa
}
}, "./config")
exportRPCs = () => [
RPCs = () => [
this.getHeadCount,
this.getGuildInfo
]
exportRPCFeatures = () => [{
RPCFeatures = () => [{
name: 'manageGuild' as 'manageGuild',
exportRPCs: () => [
RPCs: () => [
this.setName,
this.setRealm,
this.setDescription
+3 -1
View File
@@ -9,8 +9,10 @@ export class IItemManager{
setPriority: (itemname:string, priority: any) => Promise<void>
calculatePriorities: (itemname: string, character:Character) => Promise<number>
deletePriority: (priority:SRPriority) => Promise<void>
getTokens: (character:Character, tiers: Tiers[], valid?:boolean) => Promise<(SRToken & Character & Item)[] | undefined>
getTokens: (character:Character, tiers: Tiers[], valid:boolean) => Promise<(SRToken & Character & Item)[] | undefined>
getToken: (character:Character, item:Item, valid?:boolean) => Promise<(SRToken & Character & Item) | undefined>
getAllPriorities: () => Promise<(SRPriority & Spec & Item)[]>
wipeCurrencyAndItems: () => Promise<void>
decayTokens: (tier: Tiers, amount?:number) => Promise<void>
decayTokensOfCharacter: (tier: Tiers, character:Character, amount?:number) => Promise<void>
}
+43 -17
View File
@@ -10,7 +10,7 @@ import { IUserManager } from "../User/Interface";
import { ICharacterManager } from "../Character/Interface";
import { IPubSub } from "../PubSub/Interface";
import { IRaidManager } from "../Raid/Interface";
import { getLogger } from "frontblock-generic/Types";
import { getLogger } from "log4js";
const fetch = require('node-fetch')
const xml2js = require('xml2js');
@@ -36,7 +36,7 @@ export class ItemManager
@Inject(IRaidManager)
private raidManager: IRaidManager
exportRPCs = () => [
RPCs = () => [
this.getItems,
this.getItem,
this.buyToken,
@@ -46,15 +46,15 @@ export class ItemManager
this.getAllPriorities
]
exportRPCFeatures = () => [{
RPCFeatures = () => [{
name: 'managePriorities' as 'managePriorities',
exportRPCs: () => [
RPCs: () => [
this.setPriority,
this.deletePriority
],
}, {
name: 'reset' as 'reset',
exportRPCs: () => [
RPCs: () => [
this.wipeCurrencyAndItems
]
}]
@@ -129,7 +129,7 @@ export class ItemManager
return item
}catch(e){
getLogger('ItemManager', 'error').error(name, e);
getLogger('ItemManager').error(name, e);
}
}
@@ -191,14 +191,14 @@ export class ItemManager
const streaks = await this.getTokens(character, [item.tier], false)
const activeTokens = await this.getTokens(character, [item.tier], true)
await this.userManager.decrementCurrency(record.user, item.tier, 1)
await this.userManager.decrementCurrency(record.user, item.tier, currency)
const modifier = await this.calculatePriorities(itemname, character)
const tx = await this.admin.knex.transaction()
if (streaks.length > 0) {
if (streaks.length > 0) { //if an old streak already exists
const myStreak = streaks.find(token => token.itemname === itemname)
if (myStreak) {
if (myStreak) { //and the streak is for this item
//getLogger('ItemManager').debug('update signupid and increment level')
await this.admin
.knex(item.tier + 'tokens')
@@ -209,12 +209,12 @@ export class ItemManager
})
.update({
signupid: signup.id,
level: myStreak.level + 1
level: myStreak.level + currency + 1
})
}
//getLogger('ItemManager').debug('delete streaks')
//getLogger('ItemManager').debug('delete other streaks')
await Promise.all(streaks.map(async s => await this.admin
.knex(item.tier + 'tokens')
.transacting(tx)
@@ -226,35 +226,36 @@ export class ItemManager
.del()
))
//If there was a streak for this item we're done
if (myStreak) {
await tx.commit()
await this.notifyRaid({ id: signup.raidid })
return await this.getToken(character, item)
}
}
//check if there is an active reserve for this item
const matchingReserve = activeTokens.find(token => token.itemname === itemname)
if (matchingReserve) {
//getLogger('ItemManager').debug('upgrade reserve')
getLogger('ItemManager').debug('upgrade reserve')
await this.admin
.knex(item.tier + 'tokens')
.transacting(tx)
.increment('level')
.increment('level', currency + 1)
.where({
signupid: signup.id,
characterid: character.id,
itemname: item.itemname
})
} else {
//getLogger('ItemManager').debug('new reserve')
getLogger('ItemManager').debug('new reserve')
await this.admin
.knex(item.tier + 'tokens')
.transacting(tx)
.insert({
characterid: character.id,
itemname: item.itemname,
level: 1 + modifier,
level: 1 + modifier + currency,
signupid: signup.id
})
}
@@ -346,7 +347,7 @@ export class ItemManager
.first()
}
getTokens = async (character: Character, tiers: Tiers[], valid = true): Promise<(SRToken & Character & Item)[]> => {
getTokens = async (character: Character, tiers: Tiers[], valid:boolean): Promise<(SRToken & Character & Item)[]> => {
const ret = await Promise.all(tiers.map(async tier => {
return await this.admin
.knex(tier + 'tokens as t')
@@ -367,6 +368,31 @@ export class ItemManager
return ret.flat()
}
decayTokens = async (tier: Tiers, amount = 1) => {
await this.admin
.knex(tier + 'tokens')
.decrement('level', Math.max(amount, 1))
await this.admin
.knex(tier + 'tokens as t')
.where('level', '<=', 0)
.del()
}
decayTokensOfCharacter = async (tier: Tiers, character:Character, amount = 1) => {
await this.admin
.knex(tier + 'tokens')
.where({
characterid: character.id
})
.decrement('level', Math.max(amount, 1))
await this.admin
.knex(tier + 'tokens as t')
.where('level', '<=', 0)
.del()
}
countItems = async (): Promise<number> => {
const count = await this.admin
.knex('items')
+1 -1
View File
@@ -143,7 +143,7 @@ implements RPCExporter<PluginLoaderIfc, "PluginLoader">{
name = "PluginLoader" as "PluginLoader";
exportRPCs(){
RPCs(){
return [{
name: "installPlugin" as "installPlugin",
call: this.installPlugin,
+1 -1
View File
@@ -13,7 +13,7 @@ implements RPCExporter{
}
}= {}
exportRPCs = () => [
RPCs = () => [
this.unsubscribe,
{
name: 'subscribe',
+1 -1
View File
@@ -18,7 +18,7 @@ implements RPCExporter<ConfigLoaderIfc<ConfT>, "Config">{
name = "Config" as "Config"
exportRPCs = () => [
RPCs = () => [
this.getConfig,
this.resetConfig,
this.setConfig,
+3 -2
View File
@@ -6,13 +6,14 @@ export class IRaidManager{
addSignup: (signup: Signup) => Promise<Signup>
removeSignup: (signup: Signup) => Promise<any>
getSignups: (raid:Raid) => Promise<(Signup & Character & Spec & User)[]>
sign: (userToken: string, character:Character, raid:Raid, late:boolean, memo?: string) => Promise<any>
sign: (userToken: string, character:Character, raid:Raid, late:boolean, absent:boolean, memo?: string) => Promise<any>
unsign: (userToken: string, character:Character, raid:Raid,) => Promise<any>
archiveRaid: (raid:Raid) => Promise<RaidData>
getRaidData: (raid:Raid) => Promise<RaidData>
setBenched: (signup: Signup) => Promise<void>
updateSignup: (signup: Signup) => Promise<void>
getPastRaids: (limit: number) => Promise<RaidData[]>
getArchiveRaid: (id:number) => Promise<RaidData>
startRaid: (raid:Raid) => Promise<RaidData>
adminUnsign: (character:Character, raid:Raid) => Promise<any>
cancelRaid: (raid: Raid) => Promise<void>
}
+2 -1
View File
@@ -15,9 +15,10 @@ export type RaidManagerFeatureIfc = {
addSignup: IRaidManager['addSignup']
removeSignup: IRaidManager['removeSignup']
archiveRaid: IRaidManager['archiveRaid']
setBenched: IRaidManager['setBenched']
updateSignup: IRaidManager['updateSignup']
startRaid: IRaidManager['startRaid']
adminUnsign: IRaidManager['adminUnsign']
cancelRaid: IRaidManager['cancelRaid']
}
signup: {
getSignups: IRaidManager['getSignups']
+72 -36
View File
@@ -33,28 +33,29 @@ export class RaidManager
@Inject(IPubSub)
private pubsub: IPubSub<any>
exportRPCs = () => [
RPCs = () => [
this.getRaids,
this.getRaidData,
this.getPastRaids,
this.getArchiveRaid
]
exportRPCFeatures() {
RPCFeatures() {
return [{
name: 'manageRaid' as 'manageRaid',
exportRPCs: () => [
RPCs: () => [
this.createRaid,
this.addSignup,
this.removeSignup,
this.archiveRaid,
this.setBenched,
this.updateSignup,
this.startRaid,
this.adminUnsign
this.adminUnsign,
this.cancelRaid
]
}, {
name: 'signup' as 'signup',
exportRPCs: () => [
RPCs: () => [
this.getSignups,
this.sign,
this.unsign
@@ -98,20 +99,20 @@ export class RaidManager
]
}
notifyRaid = async (raid:Raid | {id:number}) => {
notifyRaid = async (raid: Raid | { id: number }) => {
const data = await this.getRaidData(<Raid>raid)
try{
try {
await this.pubsub.publish(String(raid.id), data)
await this.notifyRaids()
}catch(e){
} catch (e) {
getLogger('RaidManager#notifyRaid').debug(e);
}
}
notifyRaids = async () => {
try{
try {
await this.pubsub.publish('raids', undefined)
}catch(e){
} catch (e) {
getLogger('RaidManager#notifyRaids').debug(e);
}
}
@@ -171,6 +172,9 @@ export class RaidManager
}
startRaid = async (raid: Raid): Promise<RaidData> => {
const data = await this.getRaidData(raid)
data.participants.absent.map(p => this.itemManager.decayTokensOfCharacter(raid.tier, p, 1))
await this.itemManager.decayTokens(data.tier)
const archived = await this.archiveRaid(raid)
const giveCurrency = async (b: Character) => {
@@ -180,17 +184,15 @@ export class RaidManager
await Promise.all([
...archived.participants.bench.map(giveCurrency),
...Object.values(archived.participants).flat().map((b:Signup & Character & Spec) => giveCurrency(b))
...Object.values(archived.participants).flat().map((b: Signup & Character & Spec) => giveCurrency(b))
])
await this.notifyRaids()
return archived
}
archiveRaid = async (raid: Raid): Promise<RaidData> => {
const raidData = await this.getRaidData(raid)
const tx = await this.admin.knex.transaction()
await this.admin.knex('archive')
@@ -203,13 +205,13 @@ export class RaidManager
await Promise.all(
Object.values(raidData.participants).flat().flatMap((p: (Signup & Character & Spec)) =>
this.admin
.knex(raid.tier + 'tokens')
.transacting(tx)
.where({
characterid: p.characterid,
signupid: null
})
.del()
.knex(raid.tier + 'tokens')
.transacting(tx)
.where({
characterid: p.characterid,
signupid: null
})
.del()
))
await this.admin.knex('raids')
@@ -225,15 +227,30 @@ export class RaidManager
id: raidData.id,
})
.first()
return JSON.parse(row.raiddata)
try {
return JSON.parse(row.raiddata)
} catch (e) {
getLogger('RaidManager#archiveRaid').error(row.id + " could not get parsed")
return {} as RaidData
}
}
getArchiveRaid = async (id: number): Promise<RaidData> => {
const data = await this.admin.knex('archive').select('raiddata').where({
id: id
}).first()
const data = await this.admin
.knex('archive')
.select('raiddata')
.where({
id: id
})
.first()
return JSON.parse(data.raiddata)
try {
return JSON.parse(data.raiddata)
} catch (e) {
getLogger('RaidManager#getArchiveRaid').error(id + " could not get parsed")
return {} as RaidData
}
}
getPastRaids = async (limit: number): Promise<RaidData[]> => {
@@ -259,6 +276,7 @@ export class RaidManager
Warrior: <(Signup & Character & Spec)[]>[],
late: <(Signup & Character & Spec)[]>[],
bench: <(Signup & Character & Spec)[]>[],
absent: <(Signup & Character & Spec)[]>[]
},
tokens: {},
healers: <(Signup & Character & Spec)[]>[],
@@ -271,7 +289,8 @@ export class RaidManager
.where({
raidid: this.admin.knex.ref('raids.id'),
benched: false,
late: false
late: false,
absent: false
})
.as('signupcount')
@@ -283,7 +302,7 @@ export class RaidManager
const characterData: (Signup & Character & Spec)[] = await this.admin
.knex('signups as s')
.select('s.id as id', 'charactername', 'rank', 'class', 'specid', 'specname', 'race', 'userid', 'benched', 'late', 'raidid', 'characterid', 'specid', 'memo', 'timestamp')
.select('s.id as id', 'charactername', 'rank', 'class', 'specid', 'specname', 'race', 'userid', 'benched', 'late', 'raidid', 'characterid', 'specid', 'memo', 'timestamp', 'absent')
.join('raids as r', 's.raidid', '=', 'r.id')
.join('characters as c', 's.characterid', '=', 'c.id')
.join('users as u', 'c.userid', '=', 'u.id')
@@ -291,6 +310,10 @@ export class RaidManager
.where('r.id', '=', raid.id)
characterData.forEach(data => {
if(data.absent){
raiddata.participants.absent.push(data)
return
}
if (data.benched) {
raiddata.participants.bench.push(data)
return
@@ -307,7 +330,7 @@ export class RaidManager
.select('*', 's.id as id')
.join('raids as r', 's.raidid', '=', 'r.id')
.join('characters as c', 's.characterid', '=', 'c.id')
.join('users as u', 'u.id', '=' ,'c.userid')
.join('users as u', 'u.id', '=', 'c.userid')
.join(raidInDb.tier + 'tokens as t', 't.characterid', '=', 'c.id')
.join('items as i', 'i.itemname', '=', 't.itemname')
.where({
@@ -327,6 +350,7 @@ export class RaidManager
raiddata.tanks = Object.values(raiddata.participants).flatMap(
(tanks: any[]) => tanks.filter((p: any) =>
!p.benched
&& !p.absent
&& !p.late
&& (p.specname === "Protection"
|| p.specname === "Feral (Tank)"))
@@ -334,6 +358,7 @@ export class RaidManager
raiddata.healers = Object.values(raiddata.participants).flatMap(
(healers: any[]) => healers.filter((p: any) =>
!p.benched
&& !p.absent
&& !p.late
&& (p.specname === "Holy"
|| p.specname === "Discipline"
@@ -354,13 +379,13 @@ export class RaidManager
.select('*', 'si.id as id')
.where('raidid', '=', raid.id!)
sign = async (usertoken: string, character: Character, raid: Raid, late: boolean, memo?: string) => {
sign = async (usertoken: string, character: Character, raid: Raid, late: boolean, absent:boolean, memo?: string) => {
const maybeUserRecord = this.userManager.getUserRecordByToken(usertoken)
if (!maybeUserRecord || maybeUserRecord.user.id != character.userid) {
throw new Error("Bad Usertoken")
}
if(memo) memo = memo.substring(0, MAX_MEMO_LENGTH)
if (memo) memo = memo.substring(0, MAX_MEMO_LENGTH)
const exists = await this.admin
.knex('signups')
.select('*')
@@ -377,6 +402,7 @@ export class RaidManager
raidid: raid.id!,
characterid: character.id!,
late: late,
absent: absent,
benched: false,
memo: memo
})
@@ -390,6 +416,7 @@ export class RaidManager
raidid: raid.id!,
characterid: character.id!,
late: late,
absent: absent,
benched: false,
memo: memo
})
@@ -407,6 +434,16 @@ export class RaidManager
.first()
}
cancelRaid = async (raid: Raid) => {
const data = await this.getRaidData(raid)
const participants = Object.values(data.participants).flat()
await Promise.all(
participants.map(async p => await this.adminUnsign({...p, id: p.characterid}, raid))
)
await this.admin.knex('raids').where({id: raid.id}).del()
await this.notifyRaids()
}
unsign = async (usertoken: string, character: Character, raid: Raid) => {
const maybeUserRecord = this.userManager.getUserRecordByToken(usertoken)
if (!maybeUserRecord || maybeUserRecord.user.id != character.userid) {
@@ -417,17 +454,16 @@ export class RaidManager
}
adminUnsign = async (character: Character, raid: Raid) => {
const user = await this.characterManager.getUserOfCharacter(character)
const tokens = await this.itemManager.getTokens(character, [raid.tier], true)
//check if token has to be deleted
if (tokens) {
Promise.all(
await Promise.all(
tokens.map(async token => {
await this.userManager.incrementCurrency(user, raid.tier, 1)
const prio = await this.itemManager.calculatePriorities(token.itemname, character)
if (token.level <= prio + 1) {
if (token.level <= prio + 2) {
await this.admin
.knex(raid.tier + 'tokens')
.where({
@@ -442,7 +478,7 @@ export class RaidManager
itemname: token.itemname
}).update({
signupid: null,
level: token.level - 1
level: token.level - 2
})
}
})
@@ -459,7 +495,7 @@ export class RaidManager
await this.notifyRaid(raid)
}
setBenched = async (signup: Signup): Promise<void> => {
updateSignup = async (signup: Signup): Promise<void> => {
await this.admin.knex('signups')
.where({
raidid: signup.raidid,
+24 -25
View File
@@ -53,7 +53,7 @@ export class UserManager
userLogins: { [username in string]: UserRecord } = {}
allowed: string[] = []
exportRPCs = () => [
RPCs = () => [
this.login,
this.logout,
this.getAuth,
@@ -63,23 +63,23 @@ export class UserManager
this.changePassword
]
exportRPCFeatures = () => [
RPCFeatures = () => [
{
name: 'manageUser' as 'manageUser',
exportRPCs: () => [
RPCs: () => [
this.adminLogout,
this.changeRank,
this.adminChangePassword
]
}, {
name: 'modifyPermissions' as 'modifyPermissions',
exportRPCs: () => [
RPCs: () => [
this.getPermissions,
this.setPermission,
]
}, {
name: 'softreserveCurrency' as 'softreserveCurrency',
exportRPCs: () => [
RPCs: () => [
this.incrementCurrency,
this.decrementCurrency,
this.setCurrency
@@ -137,7 +137,7 @@ export class UserManager
getLogger('UserManager#initialize').debug('setting up permissions')
await Promise.all(
[this, ...this.exporters].flatMap(exp => exp.exportRPCFeatures().map(async (feature) => {
[this, ...this.exporters].flatMap(exp => exp.RPCFeatures().map(async (feature) => {
try {
await this.admin.knex.insert({ rpcname: feature.name }).into('rpcpermissions')
} catch (e) {
@@ -149,16 +149,16 @@ export class UserManager
server: rankServer,
port: 20001
}
setInterval(this.checkExpiredSessions, 600_000)
//setInterval(this.checkExpiredSessions, 600_000)
}
stop = async () => {
Object.values(this.userLogins).forEach(x => {
Object.values(x.connections).forEach(c => c.destroy())
Object.values(x.connections).forEach(c => c.close())
})
try {
return this.rankServer.server.destroy()
return this.rankServer.server.close()
} catch (e) {
getLogger('UserManager#stop').debug(String(e))
}
@@ -200,7 +200,7 @@ export class UserManager
return false
}
this.userLogins[data.user.username].connections[socket.port] = socket
this.userLogins[data.user.username].connections[socket.id] = socket
//getLogger('UserManager#checkConnection').debug(this.userLogins, this.allowed);
return true
@@ -376,28 +376,28 @@ export class UserManager
startRankServer = async (port: number): Promise<RPCServer<FrontcraftFeatureIfc>> => {
let rpcs = [
...this.exportRPCFeatures(),
...this.exporters.flatMap((exp) => exp.exportRPCFeatures())
...this.RPCFeatures(),
...this.exporters.flatMap((exp) => exp.RPCFeatures())
]
let rpcServer = new RPCServer<FrontcraftFeatureIfc>(port, rpcs, {
let rpcServer = new RPCServer<FrontcraftFeatureIfc>(rpcs, {
accessFilter: async (sesame, exporter) => {
const record = this.getUserRecordByToken(sesame!)
if (!record) return false
return await this.getPermission(exporter.name, record.user.rank)
},
closeHandler: (socket) => {
Object.values(this.userLogins).forEach(login => delete login.connections[socket.port])
getLogger('UserManager#closeHandler').debug(this.userLogins, this.allowed)
Object.values(this.userLogins).forEach(login => delete login.connections[socket.id])
//getLogger('UserManager#closeHandler').debug(this.userLogins, this.allowed)
},
connectionHandler: (socket) => {
this.checkConnection(socket, 10).then(res => {
if (!res) {
getLogger('UserManager#connectionHandler').debug("Connection on "+socket.port+" failed to authenticate")
socket.destroy();
getLogger('UserManager#connectionHandler').debug("Connection "+socket.id+" failed to authenticate")
socket.close();
}
}).catch((e) => {
getLogger('UserManager#connectionHandler').debug(String(e))
socket.destroy();
socket.close();
})
},
errorHandler: (socket, e, rpcName, args) => {
@@ -405,8 +405,7 @@ export class UserManager
throw(new Error("RPC failed"))
},
sesame: (sesame) => this.checkToken(sesame),
visibility: '0.0.0.0'
})
}).listen(port)
return rpcServer
}
@@ -451,8 +450,8 @@ export class UserManager
return usr[tier]!
}
decrementCurrency = async (user: User, tier?: Tiers, value = 1) => {
if (!tier || value < 1) return
decrementCurrency = async (user: User, tier: Tiers, value = 1) => {
if (value < 1) return
const usr: User = await this.admin
.knex('users')
@@ -460,7 +459,7 @@ export class UserManager
.select('*')
.first()
if (!usr || usr[tier]! <= 0) return
if (!usr || usr[tier]!-value < 0) return
await this.admin
.knex('users')
@@ -476,8 +475,8 @@ export class UserManager
.increment(tier, value)
}
setCurrency = async (user: User, tier?: Tiers, value = 0) => {
if (!tier || value < 0) return
setCurrency = async (user: User, tier: Tiers, value = 0) => {
if (value < 0) return
await this.admin
.knex('users')
.where('id', '=', user.id)
+2 -2
View File
@@ -14,8 +14,8 @@ export interface FrontworkComponent<
{
name: Name;
exportRPCFeatures(): RPCExporter<FeatureIfc, FeatureName>[]
exportRPCs(): RPCDefinitions<Ifc>[Name]
RPCFeatures(): RPCExporter<FeatureIfc, FeatureName>[]
RPCs(): RPCDefinitions<Ifc>[Name]
getTableDefinitions(): TableDefiniton[]
initialize?(): Promise<any>
+416 -280
View File
@@ -1,284 +1,420 @@
export type Tiers = "MC" | 'BWL' | 'ZG' | 'AQ20' | 'AQ40' | 'Naxx'
export const _Tiers:Tiers[] = ["MC", 'BWL', 'ZG', 'AQ20', 'AQ40', 'Naxx']
export type Tiers = "MC" | 'BWL' | 'ZG' | 'AQ20' | 'AQ40' | 'Naxx'
export const _Tiers: Tiers[] = ["MC", 'BWL', 'ZG', 'AQ20', 'AQ40', 'Naxx']
export const T1 = [
"Robe of Volatile Power",
"Salamander Scale Pants",
"Heavy Dark Iron Ring",
"Ring of Spell Power",
"Sorcerous Dagger",
"Wristguards of Stability",
"Helm of the Lifegiver",
"Fire Runed Grimoire",
"Crimson Shocker",
"Mana Igniting Cord",
"Quick Strike Ring",
"Seal of the Archmagus",
"Talisman of Ephemeral Power",
"Flameguard Gauntlets",
"Magma Tempered Boots",
"Obsidian Edged Blade",
"Aged Core Leather Gloves",
"Sabatons of the Flamewalker",
"Striker's Mark",
"Medallion of Steadfast Might",
"Earthshaker",
"Brutality Blade",
"Aurastone Hammer",
"Gutgore Ripper",
"Drillborer Disk",
"Azuresong Mageblade",
"Staff of Dominance",
"Blastershot Launcher",
"The Eye of Divinity",
"Ancient Petrified Leaf",
"Finkle's Lava Dredger",
"Core Hound Tooth",
"Core Forged Greaves",
"Gloves of the Hypnotic Flame",
"Sash of Whispered Secrets",
"Wild Growth Spaulders",
"Fireproof Cloak",
"Wristguards of True Flight",
"Fireguard Shoulders",
"Cauterizing Band",
"Onslaught Girdle",
"Perdition's Blade",
"Cloak of the Shrouded Mists",
"Band of Accuria",
"Crown of Destruction",
"Choker of the Fire Lord",
"Band of Sulfuras",
"Dragon's Blood Cape",
"Malistar's Defender",
"Spinal Reaper",
"Bonereaver's Edge",
"Shard of the Flame",
"Essence of the Pure Flame",
"Eye of Sulfuras",
"Deathbringer",
"Vis'kag the Bloodletter",
"Sapphiron Drape",
"Ancient Cornerstone Grimoire",
"Eskhandar's Collar",
"Ring of Binding",
"Shard of the Scale",
"Head of Onyxia",
"Bindings of the Windseeker",
"Cenarion Belt",
"Cenarion Boots",
"Cenarion Bracers",
"Cenarion Vestments",
"Cenarion Helm",
"Cenarion Leggings",
"Cenarion Spaulders",
"Giantstalker's Belt",
"Giantstalker's Boots",
"Giantstalker's Bracers",
"Giantstalker's Breastplate",
"Giantstalker's Epaulets",
"Giantstalker's Gloves",
"Giantstalker's Helmet",
"Giantstalker's Leggings",
"Arcanist Belt",
"Arcanist Bindings",
"Arcanist Crown",
"Arcanist Boots",
"Arcanist Gloves",
"Arcanist Leggings",
"Arcanist Mantle",
"Arcanist Robes",
"Lawbringer Belt",
"Lawbringer Boots",
"Lawbringer Bracers",
"Lawbringer Chestguard",
"Lawbringer Gauntlets",
"Lawbringer Helm",
"Lawbringer Legplates",
"Lawbringer Spaulders",
"Boots of Prophecy",
"Circlet of Prophecy",
"Girdle of Prophecy",
"Gloves of Prophecy",
"Pants of Prophecy",
"Mantle of Prophecy",
"Robes of Prophecy",
"Vambraces of Prophecy",
"Nightslayer Belt",
"Nightslayer Bracelets",
"Nightslayer Chestpiece",
"Nightslayer Cover",
"Nightslayer Gloves",
"Nightslayer Pants",
"Nightslayer Shoulder Pads",
"Felheart Belt",
"Felheart Bracers",
"Felheart Gloves",
"Felheart Pants",
"Felheart Robes",
"Felheart Shoulder Pads",
"Felheart Horns",
"Belt of Might",
"Bracers of Might",
"Breastplate of Might",
"Gauntlets of Might",
"Helm of Might",
"Legplates of Might",
"Pauldrons of Might",
"Sabatons of Might",
"Earthfury Belt",
"Earthfury Boots",
"Earthfury Bracers",
"Earthfury Vestments",
"Earthfury Epaulets",
"Earthfury Gauntlets",
"Earthfury Helmet",
"Earthfury Legguards",
"Stormrage Cover",
"Stormrage Legguards",
"Dragonstalker's Helm",
"Dragonstalker's Legguards",
"Netherwind Crown",
"Netherwind Pants",
"Judgement Crown",
"Judgement Legplates",
"Halo of Transcendence",
"Leggings of Transcendence",
"Bloodfang Hood",
"Bloodfang Pants",
"Helmet of Ten Storms",
"Nemesis Skullcap",
"Nemesis Leggings",
"Helm of Wrath",
"Legplates of Wrath",
"Robe of Volatile Power",
"Salamander Scale Pants",
"Heavy Dark Iron Ring",
"Ring of Spell Power",
"Sorcerous Dagger",
"Wristguards of Stability",
"Helm of the Lifegiver",
"Fire Runed Grimoire",
"Crimson Shocker",
"Mana Igniting Cord",
"Quick Strike Ring",
"Seal of the Archmagus",
"Talisman of Ephemeral Power",
"Flameguard Gauntlets",
"Magma Tempered Boots",
"Obsidian Edged Blade",
"Aged Core Leather Gloves",
"Sabatons of the Flamewalker",
"Striker's Mark",
"Medallion of Steadfast Might",
"Earthshaker",
"Brutality Blade",
"Aurastone Hammer",
"Gutgore Ripper",
"Drillborer Disk",
"Azuresong Mageblade",
"Staff of Dominance",
"Blastershot Launcher",
"The Eye of Divinity",
"Ancient Petrified Leaf",
"Finkle's Lava Dredger",
"Core Hound Tooth",
"Core Forged Greaves",
"Gloves of the Hypnotic Flame",
"Sash of Whispered Secrets",
"Wild Growth Spaulders",
"Fireproof Cloak",
"Wristguards of True Flight",
"Fireguard Shoulders",
"Cauterizing Band",
"Onslaught Girdle",
"Perdition's Blade",
"Cloak of the Shrouded Mists",
"Band of Accuria",
"Crown of Destruction",
"Choker of the Fire Lord",
"Band of Sulfuras",
"Dragon's Blood Cape",
"Malistar's Defender",
"Spinal Reaper",
"Bonereaver's Edge",
"Shard of the Flame",
"Essence of the Pure Flame",
"Eye of Sulfuras",
"Deathbringer",
"Vis'kag the Bloodletter",
"Sapphiron Drape",
"Ancient Cornerstone Grimoire",
"Eskhandar's Collar",
"Ring of Binding",
"Shard of the Scale",
"Head of Onyxia",
"Bindings of the Windseeker",
"Cenarion Belt",
"Cenarion Boots",
"Cenarion Bracers",
"Cenarion Vestments",
"Cenarion Helm",
"Cenarion Leggings",
"Cenarion Spaulders",
"Giantstalker's Belt",
"Giantstalker's Boots",
"Giantstalker's Bracers",
"Giantstalker's Breastplate",
"Giantstalker's Epaulets",
"Giantstalker's Gloves",
"Giantstalker's Helmet",
"Giantstalker's Leggings",
"Arcanist Belt",
"Arcanist Bindings",
"Arcanist Crown",
"Arcanist Boots",
"Arcanist Gloves",
"Arcanist Leggings",
"Arcanist Mantle",
"Arcanist Robes",
"Lawbringer Belt",
"Lawbringer Boots",
"Lawbringer Bracers",
"Lawbringer Chestguard",
"Lawbringer Gauntlets",
"Lawbringer Helm",
"Lawbringer Legplates",
"Lawbringer Spaulders",
"Boots of Prophecy",
"Circlet of Prophecy",
"Girdle of Prophecy",
"Gloves of Prophecy",
"Pants of Prophecy",
"Mantle of Prophecy",
"Robes of Prophecy",
"Vambraces of Prophecy",
"Nightslayer Belt",
"Nightslayer Bracelets",
"Nightslayer Chestpiece",
"Nightslayer Cover",
"Nightslayer Gloves",
"Nightslayer Pants",
"Nightslayer Shoulder Pads",
"Felheart Belt",
"Felheart Bracers",
"Felheart Gloves",
"Felheart Pants",
"Felheart Robes",
"Felheart Shoulder Pads",
"Felheart Horns",
"Belt of Might",
"Bracers of Might",
"Breastplate of Might",
"Gauntlets of Might",
"Helm of Might",
"Legplates of Might",
"Pauldrons of Might",
"Sabatons of Might",
"Earthfury Belt",
"Earthfury Boots",
"Earthfury Bracers",
"Earthfury Vestments",
"Earthfury Epaulets",
"Earthfury Gauntlets",
"Earthfury Helmet",
"Earthfury Legguards",
"Stormrage Cover",
"Stormrage Legguards",
"Dragonstalker's Helm",
"Dragonstalker's Legguards",
"Netherwind Crown",
"Netherwind Pants",
"Judgement Crown",
"Judgement Legplates",
"Halo of Transcendence",
"Leggings of Transcendence",
"Bloodfang Hood",
"Bloodfang Pants",
"Helmet of Ten Storms",
"Nemesis Skullcap",
"Nemesis Leggings",
"Helm of Wrath",
"Legplates of Wrath",
]
export const T2:string[] = [
"Gloves of Rapid Evolution",
"Mantle of the Blackwing Cabal",
"Spineshatter",
"The Untamed Blade",
"Pendant of the Fallen Dragon",
"Helm of Endless Rage",
"Dragonfang Blade",
"Red Dragonscale Protector",
"Black Brood Pauldrons",
"Bracers of Arcane Accuracy",
"Heartstriker",
"Maladath, Runed Blade of the Black Flight",
"Black Ash Robe",
"Firemaw's Clutch",
"Claw of the Black Drake",
"Cloak of Firemaw",
"Legguards of the Fallen Crusader",
"Taut Dragonhide Belt",
"Drake Talon Pauldrons",
"Rejuvenating Gem",
"Drake Talon Cleaver",
"Band of Forced Concentration",
"Drake Fang Talisman",
"Ebony Flame Gloves",
"Malfurion's Blessed Bulwark",
"Dragonbreath Hand Cannon",
"Shadow Wing Focus Staff",
"Shroud of Pure Thought",
"Circle of Applied Force",
"Emberweave Leggings",
"Styleen's Impeding Scarab",
"Dragon's Touch",
"Herald of Woe",
"Taut Dragonhide Shoulderpads",
"Chromatic Boots",
"Taut Dragonhide Gloves",
"Shimmering Geta",
"Ring of Blackrock",
"Elementium Threaded Cloak",
"Angelista's Grasp",
"Girdle of the Fallen Crusader",
"Empowered Leggings",
"Chromatically Tempered Sword",
"Claw of Chromaggus",
"Primalist's Linked Waistguard",
"Ashjre'thul, Crossbow of Smiting",
"Elementium Reinforced Bulwark",
"Head of Nefarian",
"Cloak of the Brood Lord",
"Boots of the Shadow Flame",
"Therazane's Link",
"Archimtiros' Ring of Reckoning",
"Neltharion's Tear",
"Pure Elementium Band",
"Mish'undare, Circlet of the Mind Flayer",
"Prestor's Talisman of Connivery",
"Staff of the Shadow Flame",
"Ashkandi, Greatsword of the Brotherhood",
"Crul'shorukh, Edge of Chaos",
"Lok'amir il Romathis",
"Boots of Pure Thought",
"Cloak of Draconic Might",
"Draconic Maul",
"Doom's Edge",
"Essence Gatherer",
"Band of Dark Dominion",
"Draconic Avenger",
"Interlaced Shadow Jerkin",
"Ringo's Blizzard Boots",
"Scrolls of Blinding Light",
"Rune of Metamorphosis",
"Natural Alignment Crystal",
"Mind Quickening Gem",
"Lifegiving Gem",
"Arcane Infused Gem",
"The Black Book",
"Venomous Totem",
"Nemesis Spaulders",
"Nemesis Robes",
"Nemesis Bracers",
"Nemesis Gloves",
"Nemesis Belt",
"Nemesis Boots",
"Netherwind Mantle",
"Netherwind Robes",
"Netherwind Bindings",
"Netherwind Gloves",
"Netherwind Belt",
"Netherwind Boots",
"Bloodfang Spaulders",
"Bloodfang Chestpiece",
"Bloodfang Bracers",
"Bloodfang Gloves",
"Bloodfang Belt",
"Bloodfang Boots",
"Stormrage Pauldrons",
"Stormrage Chestguard",
"Stormrage Bracers",
"Stormrage Handguards",
"Stormrage Belt",
"Stormrage Boots",
"Dragonstalker's Spaulders",
"Dragonstalker's Breastplate",
"Dragonstalker's Bracers",
"Dragonstalker's Gauntlets",
"Dragonstalker's Belt",
"Dragonstalker's Greaves",
"Judgement Spaulders",
"Judgement Breastplate",
"Judgement Bindings",
"Judgement Gauntlets",
"Judgement Belt",
"Judgement Sabatons",
"Pauldrons of Transcendence",
"Robes of Transcendence",
"Bindings of Transcendence",
"Handguards of Transcendence",
"Belt of Transcendence",
"Boots of Transcendence",
"Pauldrons of Wrath",
"Breastplate of Wrath",
"Bracelets of Wrath",
"Gauntlets of Wrath",
"Waistband of Wrath",
"Sabatons of Wrath"
export const T2: string[] = [
"Gloves of Rapid Evolution",
"Mantle of the Blackwing Cabal",
"Spineshatter",
"The Untamed Blade",
"Pendant of the Fallen Dragon",
"Helm of Endless Rage",
"Dragonfang Blade",
"Red Dragonscale Protector",
"Black Brood Pauldrons",
"Bracers of Arcane Accuracy",
"Heartstriker",
"Maladath, Runed Blade of the Black Flight",
"Black Ash Robe",
"Firemaw's Clutch",
"Claw of the Black Drake",
"Cloak of Firemaw",
"Legguards of the Fallen Crusader",
"Taut Dragonhide Belt",
"Drake Talon Pauldrons",
"Rejuvenating Gem",
"Drake Talon Cleaver",
"Band of Forced Concentration",
"Drake Fang Talisman",
"Ebony Flame Gloves",
"Malfurion's Blessed Bulwark",
"Dragonbreath Hand Cannon",
"Shadow Wing Focus Staff",
"Shroud of Pure Thought",
"Circle of Applied Force",
"Emberweave Leggings",
"Styleen's Impeding Scarab",
"Dragon's Touch",
"Herald of Woe",
"Taut Dragonhide Shoulderpads",
"Chromatic Boots",
"Taut Dragonhide Gloves",
"Shimmering Geta",
"Ring of Blackrock",
"Elementium Threaded Cloak",
"Angelista's Grasp",
"Girdle of the Fallen Crusader",
"Empowered Leggings",
"Chromatically Tempered Sword",
"Claw of Chromaggus",
"Primalist's Linked Waistguard",
"Ashjre'thul, Crossbow of Smiting",
"Elementium Reinforced Bulwark",
"Head of Nefarian",
"Cloak of the Brood Lord",
"Boots of the Shadow Flame",
"Therazane's Link",
"Archimtiros' Ring of Reckoning",
"Neltharion's Tear",
"Pure Elementium Band",
"Mish'undare, Circlet of the Mind Flayer",
"Prestor's Talisman of Connivery",
"Staff of the Shadow Flame",
"Ashkandi, Greatsword of the Brotherhood",
"Crul'shorukh, Edge of Chaos",
"Lok'amir il Romathis",
"Boots of Pure Thought",
"Cloak of Draconic Might",
"Draconic Maul",
"Doom's Edge",
"Essence Gatherer",
"Band of Dark Dominion",
"Draconic Avenger",
"Interlaced Shadow Jerkin",
"Ringo's Blizzard Boots",
"Scrolls of Blinding Light",
"Rune of Metamorphosis",
"Natural Alignment Crystal",
"Mind Quickening Gem",
"Lifegiving Gem",
"Arcane Infused Gem",
"The Black Book",
"Venomous Totem",
"Nemesis Spaulders",
"Nemesis Robes",
"Nemesis Bracers",
"Nemesis Gloves",
"Nemesis Belt",
"Nemesis Boots",
"Netherwind Mantle",
"Netherwind Robes",
"Netherwind Bindings",
"Netherwind Gloves",
"Netherwind Belt",
"Netherwind Boots",
"Bloodfang Spaulders",
"Bloodfang Chestpiece",
"Bloodfang Bracers",
"Bloodfang Gloves",
"Bloodfang Belt",
"Bloodfang Boots",
"Stormrage Pauldrons",
"Stormrage Chestguard",
"Stormrage Bracers",
"Stormrage Handguards",
"Stormrage Belt",
"Stormrage Boots",
"Dragonstalker's Spaulders",
"Dragonstalker's Breastplate",
"Dragonstalker's Bracers",
"Dragonstalker's Gauntlets",
"Dragonstalker's Belt",
"Dragonstalker's Greaves",
"Judgement Spaulders",
"Judgement Breastplate",
"Judgement Bindings",
"Judgement Gauntlets",
"Judgement Belt",
"Judgement Sabatons",
"Pauldrons of Transcendence",
"Robes of Transcendence",
"Bindings of Transcendence",
"Handguards of Transcendence",
"Belt of Transcendence",
"Boots of Transcendence",
"Pauldrons of Wrath",
"Breastplate of Wrath",
"Bracelets of Wrath",
"Gauntlets of Wrath",
"Waistband of Wrath",
"Sabatons of Wrath"
]
const AQ40 = [
//Tokens
"Qiraji Bindings of Command",
"Qiraji Bindings of Dominance",
"Vek'lor's Diadem",
"Vek'nilash's Circlet",
"Ouro's Intact Hide",
"Skin of the Great Sandworm",
"Carapace of the Old God",
"Husk of the Old God",
"Imperial Qiraji Armaments",
"Imperial Qiraji Regalia",
//Prophet Skeram
"Beetle Scaled Wristguards",
"Boots of the Unwavering Will",
"Breastplate of Annihilation",
"Cloak of Concentrated Hatred",
"Leggings of Immersion",
"Barrage Shoulders",
"Pendant of the Qiraji Guardian",
"Ring of Swarming Thought",
"Amulet of Foul Warding",
"Boots of the Redeemed Prophecy",
"Hammer of Ji'zhi",
"Staff of the Qiraji Prophets",
"Boots of the Fallen Prophet",
//Battleguard Sartura
"Robes of the Battleguard",
"Thick Qirajihide Belt",
"Creeping Vine Helm",
"Gauntlets of Steadfast Determination",
"Gloves of Enforcement",
"Leggings of the Festering Swarm",
"Necklace of Purity",
"Recomposed Boots",
"Badge of the Swarmguard",
"Legplates of Blazing Light",
"Sartura's Might",
"Scaled Leggings of Qiraji Fury",
"Silithid Claw",
//Fankriss the Unyielding
"Hive Tunneler's Boots",
"Pauldrons of the Unrelenting",
"Robes of the Guardian Saint",
"Barbed Choker",
"Fetish of the Sand Reaver",
"Mantle of Wicked Revenge",
"Scaled Sand Reaver Leggings",
"Silithid Carapace Chestguard",
"Cloak of Untold Secrets",
"Barb of the Sand Reaver",
"Libram of Grace",
"Ancient Qiraji Ripper",
"Totem of Life",
//Princess Huhuran
"Hive Defiler Wristguards",
"Wasphide Gauntlets",
"Cloak of the Golden Hive",
"Ring of the Martyr",
"Gloves of the Messiah",
"Huhuran's Stinger",
//Twin Emperors
"Boots of Epiphany",
"Vek'lor's Gloves of Devastation",
"Royal Qiraji Belt",
"Royal Scepter of Vek'lor",
"Ring of Emperor Vek'lor",
"Gloves of the Hidden Temple",
"Amulet of Vek'nilash",
"Regenerating Belt of Vek'nilash",
"Belt of the Fallen Emperor",
"Bracelets of Royal Redemption",
"Kalimdor's Revenge",
"Grasp of the Fallen Emperor",
"Qiraji Execution Bracers",
//C'Thun
"Eye of C'Thun",
"Ring of the Godslayer",
"Eyestalk Waist Cord",
"Cloak of the Devoured",
"Gauntlets of Annihilation",
"Scepter of the False Prophet",
"Mark of C'Thun",
"Cloak of Clarity",
"Dark Storm Gauntlets",
"Grasp of the Old God",
"Belt of Never-ending Agony",
"Vanquished Tentacle of C'Thun",
"Dark Edge of Insanity",
"Death's Sting",
//Viscidus
"Gauntlets of Kalimdor",
"Gauntlets of the Righteous Champion",
"Idol of Health",
"Ring of the Qiraji Fury",
"Sharpened Silithid Femur",
"Slime-coated Leggings",
"Scarab Brooch",
//Ouro
"Don Rigoberto's Lost Hat",
"Larvae of the Great Worm",
"The Burrower's Shell",
"Wormscale Blocker",
"Burrower Bracers",
"Jom Gabbar",
//3 Bugs
"Guise of the Devourer",
"Ternary Mantle",
"Cape of the Trinity",
"Robes of the Triumvirate",
"Triad Girdle",
"Angelista's Touch",
"Vest of Swift Execution",
"Ring of the Devoured",
"Petrified Scarab",
"Wand of Qiraji Nobility",
"Angelista's Charm",
"Gloves of Ebru",
"Ooze-ridden Gauntlets",
"Boots of the Fallen Hero",
"Mantle of Phrenic Power",
"Mantle of the Desert's Fury",
"Mantle of the Desert Crusade",
"Bile-Covered Gauntlets",
"Ukko's Ring of Darkness",
]
export const ZGMounts = [
@@ -288,14 +424,14 @@ export const ZGMounts = [
]
export type AllItems = {
[tier in Tiers] : string[]
[tier in Tiers]: string[]
}
export const allItems : AllItems = {
export const allItems: AllItems = {
MC: T1,
BWL: T2,
ZG: ZGMounts,
AQ20: [],
AQ40: [],
AQ40: AQ40,
Naxx: []
}
+1 -1
View File
@@ -18,5 +18,5 @@ implements ConfigExporter<ConfType>, RPCExporter, TableDefinitionExporter{
abstract getTableDefinitions(): TableDefiniton[]
abstract getDefaultConfig(): ConfType
abstract exportRPCs(): RPC<any,any>[]
abstract RPCs(): RPC<any,any>[]
}
+1 -1
View File
@@ -6,5 +6,5 @@ export interface PrivilegedRPCExporter <
Name extends keyof Ifc = keyof Ifc,
FeatureName extends keyof FeatureIfc = keyof FeatureIfc,
>extends RPCExporter<Ifc, Name>{
exportRPCFeatures() : RPCExporter<FeatureIfc, FeatureName>[]
RPCFeatures() : RPCExporter<FeatureIfc, FeatureName>[]
}
+2
View File
@@ -55,6 +55,7 @@ export type RaidData = Raid & {
} & {
late: (Signup & Character & Spec)[]
bench: (Signup & Character & Spec)[]
absent: (Signup & Character & Spec)[]
}
tokens: {
[itemname in string]: (Character & SRToken & Item)[]
@@ -163,6 +164,7 @@ export type Signup = {
characterid: number
benched: boolean
late: boolean
absent:boolean
timestamp: string
memo?: string
}
+239 -56
View File
@@ -2645,6 +2645,14 @@
"integrity": "sha1-ytdV8Pxt57cPpuXgivqB70wiSN4=",
"dev": true
},
"@types/engine.io": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/@types/engine.io/-/engine.io-3.1.4.tgz",
"integrity": "sha512-98rXVukLD6/ozrQ2O80NAlWDGA4INg+tqsEReWJldqyi2fulC9V7Use/n28SWgROXKm6003ycWV4gZHoF8GA6w==",
"requires": {
"@types/node": "*"
}
},
"@types/events": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz",
@@ -2705,10 +2713,9 @@
"dev": true
},
"@types/node": {
"version": "6.0.90",
"resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.90.tgz",
"integrity": "sha512-tXoGRVdi7wZX7P1VWoV9Wfk0uYDOAHdEYXAttuWgSrN76Q32wQlSrMX0Rgyv3RTEaQY2ZLQrzYHVM2e8rfo8sA==",
"dev": true
"version": "14.0.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.27.tgz",
"integrity": "sha512-kVrqXhbclHNHGu9ztnAwSncIgJv/FaxmzXJvGXNdcCpV1b8u1/Mi6z6m0vwy0LzKeXFTPLH0NzwmoJ3fNCIq0g=="
},
"@types/q": {
"version": "0.0.32",
@@ -2722,6 +2729,20 @@
"integrity": "sha512-/DJGXtMuklLQef49qDsmjQofzaGU6D5To2xJZRLBNZO4GLAi30IjxLy6hHRQdycXP+IZKKXqJhYyNJ53SglJ8w==",
"dev": true
},
"@types/socket.io": {
"version": "2.1.10",
"resolved": "https://registry.npmjs.org/@types/socket.io/-/socket.io-2.1.10.tgz",
"integrity": "sha512-1fQMaDU/x2LPljEI/QI5IKl8sBYHM/zv32YYKvNrVEor7/1+MLqMqmWt8Bb8Vpf+PlIPBiTTC0BnrRx7ju3xOw==",
"requires": {
"@types/engine.io": "*",
"@types/node": "*"
}
},
"@types/socket.io-client": {
"version": "1.4.33",
"resolved": "https://registry.npmjs.org/@types/socket.io-client/-/socket.io-client-1.4.33.tgz",
"integrity": "sha512-m4LnxkljsI9fMsjwpW5QhRpMixo2BeeLpFmg0AE+sS4H1pzAd/cs/ftTiL60FLZgfFa8PFRPx5KsHu8O0bADKQ=="
},
"@types/source-list-map": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz",
@@ -2952,7 +2973,6 @@
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
"integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
"dev": true,
"requires": {
"mime-types": "~2.1.24",
"negotiator": "0.6.2"
@@ -3004,8 +3024,7 @@
"after": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz",
"integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=",
"dev": true
"integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8="
},
"agent-base": {
"version": "4.3.0",
@@ -3437,8 +3456,7 @@
"async-limiter": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
"dev": true
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
},
"asynckit": {
"version": "0.4.0",
@@ -3683,8 +3701,7 @@
"backo2": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
"integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=",
"dev": true
"integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc="
},
"balanced-match": {
"version": "1.0.0",
@@ -3749,8 +3766,7 @@
"base64-arraybuffer": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz",
"integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=",
"dev": true
"integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg="
},
"base64-js": {
"version": "1.3.1",
@@ -3797,7 +3813,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz",
"integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=",
"dev": true,
"requires": {
"callsite": "1.0.0"
}
@@ -4076,19 +4091,6 @@
"node-releases": "^1.1.47"
}
},
"bsert": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/bsert/-/bsert-0.0.10.tgz",
"integrity": "sha512-NHNwlac+WPy4t2LoNh8pXk8uaIGH3NSaIUbTTRXGpE2WEbq0te/tDykYHkFK57YKLPjv/aGHmbqvnGeVWDz57Q=="
},
"bsock": {
"version": "0.1.9",
"resolved": "https://registry.npmjs.org/bsock/-/bsock-0.1.9.tgz",
"integrity": "sha512-/l9Kg/c5o+n/0AqreMxh2jpzDMl1ikl4gUxT7RFNe3A3YRIyZkiREhwcjmqxiymJSRI/Qhew357xGn1SLw/xEw==",
"requires": {
"bsert": "~0.0.10"
}
},
"buffer": {
"version": "4.9.2",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz",
@@ -4277,8 +4279,7 @@
"callsite": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
"integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=",
"dev": true
"integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA="
},
"callsites": {
"version": "2.0.0",
@@ -4752,8 +4753,7 @@
"component-bind": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
"integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=",
"dev": true
"integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E="
},
"component-emitter": {
"version": "1.3.0",
@@ -4764,8 +4764,7 @@
"component-inherit": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
"integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=",
"dev": true
"integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM="
},
"compressible": {
"version": "2.0.18",
@@ -9131,11 +9130,25 @@
}
}
},
"has-binary2": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
"integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==",
"requires": {
"isarray": "2.0.1"
},
"dependencies": {
"isarray": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
"integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
}
}
},
"has-cors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
"integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=",
"dev": true
"integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk="
},
"has-flag": {
"version": "3.0.0",
@@ -9571,8 +9584,7 @@
"indexof": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
"integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
"dev": true
"integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10="
},
"infer-owner": {
"version": "1.0.4",
@@ -13468,8 +13480,7 @@
"negotiator": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==",
"dev": true
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
},
"neo-async": {
"version": "2.6.1",
@@ -13925,8 +13936,7 @@
"object-component": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz",
"integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=",
"dev": true
"integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE="
},
"object-copy": {
"version": "0.1.0",
@@ -14440,7 +14450,6 @@
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz",
"integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=",
"dev": true,
"requires": {
"better-assert": "~1.0.0"
}
@@ -14449,7 +14458,6 @@
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz",
"integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=",
"dev": true,
"requires": {
"better-assert": "~1.0.0"
}
@@ -15043,6 +15051,12 @@
"webdriver-manager": "^12.0.6"
},
"dependencies": {
"@types/node": {
"version": "6.14.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-6.14.10.tgz",
"integrity": "sha512-pF4HjZGSog75kGq7B1InK/wt/N08BuPATo+7HRfv7gZUzccebwv/fmWVGs/j6LvSiLWpCuGGhql51M/wcQsNzA==",
"dev": true
},
"del": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
@@ -15775,20 +15789,191 @@
"integrity": "sha512-ZYzRkETgBrdEGzL5JSKimvjI2CX7ioyZCkX2BpcfyjqI+079W0wHAyj5W4rIZMcDSOHgLZtgz1IdDi/vU77KEQ=="
},
"rpclibrary": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/rpclibrary/-/rpclibrary-1.10.2.tgz",
"integrity": "sha512-uf4FtylK+tyVo1O8YVihxYxaI4KHnKBzq05SsLYe8ZPXdO8Hqrv7Je5cwv3bfx0FBCO1vVrSc8DT1P6ypGY6uQ==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/rpclibrary/-/rpclibrary-2.0.1.tgz",
"integrity": "sha512-phdU0TkrnNVXdFa5PKkbWvn+MxocowvqalEUG1jfpkc1CoQkJ9AXa4OXSEu5r2a2IFhVauYva/qXv1em5yrHSg==",
"requires": {
"bsock": "^0.1.9",
"crypto-js": "^4.0.0",
"@types/socket.io": "^2.1.8",
"@types/socket.io-client": "^1.4.33",
"http": "0.0.0",
"socket.io": "^2.3.0",
"socket.io-client": "^2.3.0",
"uuid": "^3.3.3"
},
"dependencies": {
"crypto-js": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz",
"integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg=="
"arraybuffer.slice": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
"integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog=="
},
"base64id": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
"integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog=="
},
"blob": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
"integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig=="
},
"component-emitter": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
"integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
},
"cookie": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
"integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
},
"engine.io": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.4.2.tgz",
"integrity": "sha512-b4Q85dFkGw+TqgytGPrGgACRUhsdKc9S9ErRAXpPGy/CXKs4tYoHDkvIRdsseAF7NjfVwjRFIn6KTnbw7LwJZg==",
"requires": {
"accepts": "~1.3.4",
"base64id": "2.0.0",
"cookie": "0.3.1",
"debug": "~4.1.0",
"engine.io-parser": "~2.2.0",
"ws": "^7.1.2"
}
},
"engine.io-client": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.3.tgz",
"integrity": "sha512-0NGY+9hioejTEJCaSJZfWZLk4FPI9dN+1H1C4+wj2iuFba47UgZbJzfWs4aNFajnX/qAaYKbe2lLTfEEWzCmcw==",
"requires": {
"component-emitter": "~1.3.0",
"component-inherit": "0.0.3",
"debug": "~4.1.0",
"engine.io-parser": "~2.2.0",
"has-cors": "1.1.0",
"indexof": "0.0.1",
"parseqs": "0.0.5",
"parseuri": "0.0.5",
"ws": "~6.1.0",
"xmlhttprequest-ssl": "~1.5.4",
"yeast": "0.1.2"
},
"dependencies": {
"component-emitter": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
"integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
},
"ws": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz",
"integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==",
"requires": {
"async-limiter": "~1.0.0"
}
}
}
},
"engine.io-parser": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.0.tgz",
"integrity": "sha512-6I3qD9iUxotsC5HEMuuGsKA0cXerGz+4uGcXQEkfBidgKf0amsjrrtwcbwK/nzpZBxclXlV7gGl9dgWvu4LF6w==",
"requires": {
"after": "0.8.2",
"arraybuffer.slice": "~0.0.7",
"base64-arraybuffer": "0.1.5",
"blob": "0.0.5",
"has-binary2": "~1.0.2"
}
},
"isarray": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
"integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"socket.io": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.3.0.tgz",
"integrity": "sha512-2A892lrj0GcgR/9Qk81EaY2gYhCBxurV0PfmmESO6p27QPrUK1J3zdns+5QPqvUYK2q657nSj0guoIil9+7eFg==",
"requires": {
"debug": "~4.1.0",
"engine.io": "~3.4.0",
"has-binary2": "~1.0.2",
"socket.io-adapter": "~1.1.0",
"socket.io-client": "2.3.0",
"socket.io-parser": "~3.4.0"
}
},
"socket.io-adapter": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz",
"integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g=="
},
"socket.io-client": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.3.0.tgz",
"integrity": "sha512-cEQQf24gET3rfhxZ2jJ5xzAOo/xhZwK+mOqtGRg5IowZsMgwvHwnf/mCRapAAkadhM26y+iydgwsXGObBB5ZdA==",
"requires": {
"backo2": "1.0.2",
"base64-arraybuffer": "0.1.5",
"component-bind": "1.0.0",
"component-emitter": "1.2.1",
"debug": "~4.1.0",
"engine.io-client": "~3.4.0",
"has-binary2": "~1.0.2",
"has-cors": "1.1.0",
"indexof": "0.0.1",
"object-component": "0.0.3",
"parseqs": "0.0.5",
"parseuri": "0.0.5",
"socket.io-parser": "~3.3.0",
"to-array": "0.1.4"
},
"dependencies": {
"socket.io-parser": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz",
"integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==",
"requires": {
"component-emitter": "1.2.1",
"debug": "~3.1.0",
"isarray": "2.0.1"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
}
}
}
}
},
"socket.io-parser": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz",
"integrity": "sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==",
"requires": {
"component-emitter": "1.2.1",
"debug": "~4.1.0",
"isarray": "2.0.1"
}
},
"ws": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz",
"integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA=="
},
"xmlhttprequest-ssl": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
"integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4="
}
}
},
@@ -17979,8 +18164,7 @@
"to-array": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz",
"integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=",
"dev": true
"integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA="
},
"to-arraybuffer": {
"version": "1.0.1",
@@ -21030,8 +21214,7 @@
"yeast": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
"integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=",
"dev": true
"integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk="
},
"yn": {
"version": "3.1.1",
+2 -2
View File
@@ -79,7 +79,7 @@
"normalize.css": "6.0.0",
"pace-js": "1.0.2",
"roboto-fontface": "0.8.0",
"rpclibrary": "^1.10.2",
"rpclibrary": "^2.0.1",
"rxjs": "6.5.2",
"rxjs-compat": "6.3.0",
"socicon": "3.0.5",
@@ -102,7 +102,7 @@
"@types/jasmine": "2.5.54",
"@types/jasminewd2": "2.0.3",
"@types/leaflet": "1.2.3",
"@types/node": "6.0.90",
"@types/node": "^14.0.27",
"codelyzer": "^5.0.1",
"conventional-changelog-cli": "1.3.4",
"jasmine-core": "2.6.4",
@@ -51,6 +51,7 @@ export class FrontcraftArmoryComponent implements OnInit {
const geardata = maybeItems.filter(maybeItem => maybeItem != null)
this.gear = geardata
console.log(this.gear)
console.log(this.gear.map(g => g.stats).reduce(sumStats))
}))
}
@@ -21,24 +21,5 @@ class = "col-12 col-xl-9">
<span *ngIf="link === 'owner'">
Owned by <a [routerLink]="'/frontcraft/user/'+char.username"> {{char.username}} ({{char.rank}})</a>
</span>
<br/>
<br />
<br />
<h3>Tokens</h3>
<span *ngFor="let token of tokens">
[ {{token.level}} ]
<wowhead [item]="token"></wowhead><br />
</span>
<br />
<br />
<br />
<h3>Gear of the last reported kill <a target="_blank" *ngIf="dataLink != null && dataLink != ''" style="size: 0.5em;" [href]="dataLink">(data)</a></h3>
<h5>{{boss2.name}} {{boss2.date | date : 'MMM d @ HH : mm'}}</h5>
<ng-container *ngFor="let item of gear2">
<wowhead [item]="item"></wowhead><br />
</ng-container>
</nb-card-body>
</nb-card>
@@ -4,6 +4,7 @@
</nb-card-header>
<nb-card-body>
<textarea
fullWidth
placeholder="Add a note (optional)"
rows="7"
cols="50"
@@ -13,30 +14,38 @@
<br />
<br />
<nb-card *ngFor="let character of characters">
<nb-card-header [ngStyle]="{'color': character.color}">
<nb-card-header [ngStyle]="{'color': character.color}" style="text-transform: capitalize;">
<img [src]="'../../../../assets/images/'+character.class.toLowerCase()+'.png'" />
{{character.charactername}}
</nb-card-header>
<nb-card-body>
<button
(click)="signup(character, false)"
(click)="signup(character, false, false)"
nbButton
outline
fullWidth
status="success"
size="medium">
<nb-icon icon="checkmark-outline"></nb-icon> On Time
</button>
&nbsp;
&nbsp;
&nbsp;
<button
(click)="signup(character, true)"
(click)="signup(character, true, false)"
nbButton
outline
fullWidth
status="warning"
size="medium">
<nb-icon icon="clock-outline"></nb-icon> Late
</button>
<button
(click)="signup(character, false, true)"
nbButton
outline
fullWidth
status="danger"
size="medium">
<nb-icon icon="person-delete-outline"></nb-icon> Absent
</button>
</nb-card-body>
</nb-card>
</nb-card-body>
@@ -20,12 +20,12 @@ export class FrontcraftCharacerpickerComponent implements OnInit{
private toast : NbToastrService
){}
signup = async (character: Character, late: boolean) => {
signup = async (character: Character, late: boolean, attending: boolean = true) => {
const auth = this.api.getAuth()
const signup = this.api.get('signup')
if(!signup) return
await signup.sign(auth.token.value, character, this.raid, late, this.memo)
await signup.sign(auth.token.value, character, this.raid, late, attending, this.memo)
this.toast.show('Signup', 'Success', { status: 'success' })
this.dialogRef.close()
}
@@ -26,35 +26,40 @@
({{mySignup.race}} {{mySignup.specname}} {{mySignup.class}})
<br />
Status: {{mySignup.status}}<br /><br />
<textarea [status]="mySignup.status === 'Attending'?'success':'warning'"
<textarea fullWidth *ngIf="mySignup.status !== 'Absent'"
[status]="mySignup.status === 'Attending'?'success':'warning'"
placeholder="Add a note (optional)" rows="10" cols="50" nbInput
style="white-space: pre-line;" [(ngModel)]="mySignup.memo">
</textarea>
</p>
<button *ngIf="mySignup.status === 'Late'" (click)="setLate(false)" nbButton outline
status="success" size="medium">
<button *ngIf="mySignup.status !== 'Attending'" (click)="setLate(false)" nbButton
fullWidth outline status="success" size="medium">
<nb-icon icon="checkmark-outline"></nb-icon> On Time
</button>
<button *ngIf="mySignup.status === 'Attending'" (click)="setLate(false)" nbButton
outline status="success" size="medium">
fullWidth outline status="success" size="medium">
<nb-icon icon="checkmark-outline"></nb-icon> Update
</button>
<button *ngIf="mySignup.status === 'Late'" (click)="setLate(true)" nbButton outline
status="warning" size="medium">
<button *ngIf="mySignup.status === 'Late'" (click)="setLate(true)" nbButton fullWidth
outline status="warning" size="medium">
<nb-icon icon="clock-outline"></nb-icon> Update
</button>
<button *ngIf="mySignup.status === 'Attending'" (click)="setLate(true)" nbButton outline
status="warning" size="medium">
<button *ngIf="mySignup.status !== 'Late'" (click)="setLate(true)" nbButton fullWidth
outline status="warning" size="medium">
<nb-icon icon="clock-outline"></nb-icon> Late
</button>
<button (click)="unsign()" nbButton outline status="danger" size="medium">
<button *ngIf="mySignup.status !== 'Absent'" (click)="setAbsent()" nbButton fullWidth
outline status="danger" size="medium">
<nb-icon icon="person-delete-outline"></nb-icon> Absent
</button>
<p>&nbsp;</p>
<button (click)="unsign()" nbButton fullWidth status="danger" size="medium">
<nb-icon icon="close"></nb-icon>unsign
</button>
</div>
<div *ngIf="!isSignedup">
<button (click)="signup()" nbButton outline status="success" size="medium">
<button (click)="signup()" fullWidth nbButton outline status="success" size="medium">
<nb-icon icon="person-done-outline"></nb-icon> sign up
</button>
</div>
@@ -83,21 +88,26 @@
[src]="'/assets/images/'+participant.class.toLowerCase()+'.png'" />
{{ participant.charactername }}
</a>
<ng-template #template>
<ng-template #timeInfo>
<div style="padding: 10px">
{{participant.timestamp | date : 'HH:mm EEE MMM d'}}
({{participant.before | date : 'dd'}} days before start)
</div>
</ng-template>
<nb-icon [nbPopover]="timeInfo" nbPopoverTrigger="hover"
style="width: 0.75em; height: 0.75em;" icon="clock-outline"
[status]="participant.before>8.64e+7?(participant.before>2.592e+8?'success':'warning'):'danger'">
</nb-icon>
<ng-template #memoBox>
<div style="padding: 10px">
<p
style="white-space: pre-line; max-width: 50vw; word-wrap: break-word;">
{{participant.memo}}
</p>
{{participant.timestamp | date : 'HH:mm EEE MMM d'}} ({{participant.before | date : 'dd'}} days before start)
</div>
</ng-template>
<nb-icon
[nbPopover]="template"
nbPopoverTrigger="hover"
style="width: 0.75em; height: 0.75em;"
[icon]="participant.memo != null && participant.memo != ''?'message-circle-outline':'clock-outline'"
[status]="participant.before>8.64e+7?(participant.before>2.592e+8?'success':'warning'):'danger'">
<nb-icon *ngIf="participant.memo" [nbPopover]="memoBox" nbPopoverTrigger="hover"
style="width: 0.75em; height: 0.75em;" icon="message-circle-outline">
</nb-icon>
<span *ngIf="participant.rank=='Trial'" style="font-size: 9px;">
@@ -127,21 +137,6 @@
[src]="'/assets/images/'+participant.class.toLowerCase()+'.png'" />
{{ participant.charactername }}
</a>
<ng-template #template>
<div style="padding: 10px">
<p style="white-space: pre-line;">
{{participant.memo}}
</p>
{{participant.timestamp | date : 'HH:mm EEE MMM d'}} ({{participant.before | date : 'dd'}} days before start)
</div>
</ng-template>
<nb-icon
[nbPopover]="template"
nbPopoverTrigger="hover"
style="width: 0.75em; height: 0.75em;"
[icon]="participant.memo != null && participant.memo != ''?'message-circle-outline':'clock-outline'"
[status]="participant.before>8.64e+7?(participant.before>2.592e+8?'success':'warning'):'danger'">
</nb-icon>
<span *ngIf="participant.rank=='Trial'" style="font-size: 9px;">
Trial
</span>
@@ -171,22 +166,6 @@
[src]="'/assets/images/'+participant.class.toLowerCase()+'.png'" />
{{ participant.charactername }}
</a>
<ng-template #template>
<div style="padding: 10px">
<p style="white-space: pre-line;">
{{participant.memo}}
</p>
{{participant.timestamp | date : 'HH:mm EEE MMM d'}} ({{participant.before | date : 'dd'}} days before start)
</div>
</ng-template>
<nb-icon
[nbPopover]="template"
nbPopoverTrigger="hover"
style="width: 0.75em; height: 0.75em;"
[icon]="participant.memo != null && participant.memo != ''?'message-circle-outline':'clock-outline'"
[status]="participant.before>8.64e+7?(participant.before>2.592e+8?'success':'warning'):'danger'">
</nb-icon>
<span *ngIf="participant.rank=='Trial'" style="font-size: 9px;">
Trial
</span>
@@ -200,6 +179,9 @@
<button (click)="startRaid(raid)" nbButton outline status="success" size="medium">
start
</button>
<button (click)="cancelRaid(raid)" nbButton outline status="danger" size="medium">
cancel
</button>
</nb-tab>
</nb-tabset>
</nb-card-body>
@@ -120,6 +120,12 @@ export class FrontcraftRaidComponent
this.router.navigateByUrl('/frontcraft/archive/' + raid.id)
}
async cancelRaid(raid: Raid) {
await this.manageRaid!.cancelRaid(raid)
this.toast.show('Raid cancelled', 'Success', { status: 'success' })
this.router.navigateByUrl('/frontcraft/raids')
}
unsign = async () => {
const signupFeature = this.api.get('signup')
if (!signupFeature) return
@@ -139,7 +145,21 @@ export class FrontcraftRaidComponent
await signup.sign(auth.token.value, {
...this.mySignup,
id: this.mySignup.characterid,
}, this.raid, value, this.mySignup.memo)
}, this.raid, value, false, this.mySignup.memo)
this.toast.show('Signup', 'Success', { status: 'success' })
}
setAbsent = async () => {
const auth = this.api.getAuth()
const signup = this.api.get('signup')
if (!signup) return
await signup.sign(auth.token.value, {
...this.mySignup,
id: this.mySignup.characterid,
}, this.raid, false, true, this.mySignup.memo)
this.toast.show('Signup', 'Success', { status: 'success' })
}
@@ -184,7 +204,9 @@ export class FrontcraftRaidComponent
if (matchingSignup) {
this.mySignup = matchingSignup
this.isSignedup = true
this.mySignup['status'] = matchingSignup['benched'] ? 'Bench' : matchingSignup['late'] ? 'Late' : 'Attending'
console.log(this.mySignup);
this.mySignup['status'] = matchingSignup['absent'] ? 'Absent' : matchingSignup['benched'] ? 'Bench' : matchingSignup['late'] ? 'Late' : 'Attending'
} else {
this.isSignedup = false
this.mySignup = null
@@ -209,11 +231,21 @@ export class FrontcraftRaidComponent
}
setBench(signup: Signup) {
this.manageRaid.setBenched({
characterid: signup.characterid,
raidid: signup.raidid,
late: false,
benched: !signup.benched
}).then(_ => this.refresh())
const manageRaid = this.api.get('manageRaid')
if(manageRaid){
const signupUpdated:Signup = {
benched: !signup.benched,
absent: false,
late: false,
characterid: signup.characterid,
raidid: signup.raidid,
timestamp: signup.timestamp,
id: signup.id,
memo: signup.memo
}
manageRaid.updateSignup(signupUpdated)
.then(_ => this.refresh())
}
}
}
@@ -14,7 +14,7 @@ import { IApiService } from '../../services/ApiService/ApiService';
</nb-card-header>
<nb-card-body>
<p>
{{currency}} softreserves remaining
You have {{currency}} softreserve(s) remaining
</p>
<div *ngIf="currency>0">
<nb-alert accent="danger" *ngIf="invalidatedTokens.length > 0">
@@ -37,7 +37,7 @@ import { IApiService } from '../../services/ApiService/ApiService';
The following reserve will be created<br />
<ul>
<li>
[ {{1+modifier}} ]
[ {{1+currency+modifier}} ]
<img style="min-width: 20px; width: 2.25vw; max-width: 35px" [src]="'https://wow.zamimg.com/images/wow/icons/large/'+item.iconname+'.jpg'" />
<span [ngStyle]="{'color':item.quality=='Epic'?'#a335ee':'#ff8000'}">
{{item.itemname}}
@@ -49,10 +49,10 @@ import { IApiService } from '../../services/ApiService/ApiService';
</nb-alert>
<nb-alert accent="info" *ngIf="upgradableToken != null">
The following reserve will be created<br />
The following reserve will be upgraded<br />
<ul>
<li>
[ {{upgradableToken.level}} ] => [ {{upgradableToken.level+1}} ] <img style="min-width: 20px; width: 2.25vw; max-width: 35px" [src]="'https://wow.zamimg.com/images/wow/icons/large/'+upgradableToken.iconname+'.jpg'" />
[ {{upgradableToken.level}} ] => [ {{upgradableToken.level+1+currency}} ] <img style="min-width: 20px; width: 2.25vw; max-width: 35px" [src]="'https://wow.zamimg.com/images/wow/icons/large/'+upgradableToken.iconname+'.jpg'" />
<span [ngStyle]="{'color':upgradableToken.quality=='Epic'?'#a335ee':'#ff8000'}">{{upgradableToken.itemname}}</span>
</li>
</ul>
@@ -65,7 +65,7 @@ import { IApiService } from '../../services/ApiService/ApiService';
outline
status="success"
size="small">
<nb-icon icon="checkmark-outline"></nb-icon> claim
<nb-icon icon="checkmark-outline"></nb-icon> okay
</button>
</nb-card-body>
</nb-card>
@@ -59,7 +59,7 @@ export class ClientApiService implements IApiService{
// document.cookie = JSON.stringify(auth)
return authSock
}catch(e){
if(this.privSocket) this.privSocket.destroy()
if(this.privSocket) this.privSocket.close()
return;
}
}
@@ -120,14 +120,14 @@ export class ClientApiService implements IApiService{
}
}
if(this.privSocket) this.privSocket.destroy()
if(this.privSocket) this.privSocket.close()
this.privSocket = null
this.auth = null
}
initialize = async (force = false) : Promise<any> => {
if(this.socket){
this.socket.destroy()
this.socket.close()
this.socket = null
}
@@ -71,14 +71,14 @@ export class ServerApiService implements IApiService {
}
}
if (this.privSocket) this.privSocket.destroy()
if (this.privSocket) this.privSocket.close()
this.privSocket = null
this.auth = null
}
initialize = async (): Promise<any> => {
if (this.socket) {
this.socket.destroy()
this.socket.close()
this.socket = null
}
+32 -29
View File
@@ -5,6 +5,7 @@ import { T2, Tiers } from "../src/backend/Types/Items";
import { RPCSocket, ConnectedSocket } from "rpclibrary";
import { FrontcraftIfc, Auth, User, FrontcraftFeatureIfc, Raid, Character, Rank, Class, Race, Spec, Signup } from "../src/backend/Types/Types";
import { SpecT } from "../src/backend/Types/PlayerSpecs";
import { ItemManager } from "src/backend/Components/Item/ItemManager";
type protoAccount<C extends Class = Class> = {
@@ -166,7 +167,6 @@ describe('Frontcraft', () => {
username: 'a',
MC: 2
}).then(adminUser => {
client.UserManager.login(adminUser.username, 'ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb').then(auth => {
const sock = new RPCSocket<FrontcraftFeatureIfc>(
auth.port,
@@ -194,8 +194,8 @@ describe('Frontcraft', () => {
})
after(() => {
client.destroy()
adminClient.destroy()
client.close()
adminClient.close()
server.stop()
})
@@ -240,8 +240,8 @@ describe('Frontcraft', () => {
it('should sign up', (done) => {
Promise.all(Object.values(users).map((user) =>
adminClient.signup.sign(user.auth.token.value, user.character, raids[0], false, ""+Math.floor(Math.random()*10000)).catch(done)
)).then(x => {
adminClient.signup.sign(user.auth.token.value, user.character, raids[0], false, true, ""+Math.floor(Math.random()*10000)).catch(done)
)).then(_ => {
adminClient.signup.getSignups(raids[0]).then(s => {
if (s.length == testAccounts.length) {
s.forEach(sign => {
@@ -539,7 +539,7 @@ describe('Frontcraft', () => {
users[user.account.username].item = itemname
if (!token) return false
return modifier + 1 === token.level
return modifier + 2 === token.level
})).then(success => {
if (success.reduce((prev, curr) => prev && curr, true)) done()
})
@@ -564,16 +564,8 @@ describe('Frontcraft', () => {
await adminClient.softreserveCurrency.incrementCurrency(user.account, item!.tier, 2)
const before = await client.ItemManager.getToken(user.character, item!)
if (!before || before.level !== 4) {
console.log("expected level to be 4", before ? before.level : '?');
return
}
await client.ItemManager.buyToken(user.auth.token.value, user.character.charactername, itemname, user.signup!)
const after = await client.ItemManager.buyToken(user.auth.token.value, user.character.charactername, itemname, user.signup!)
if (!after || after.level !== 6) {
console.log("expected level after to be 6", after ? after.level : '?');
if (!before || before.level !== 5) {
console.log("expected level to be 5", before ? before.level : '?');
return
}
done()
@@ -625,7 +617,7 @@ describe('Frontcraft', () => {
adminClient.reset.wipeCurrencyAndItems().then(() => {
client.UserManager.getUser(testAccounts[0].name).then(user => {
if (user && user.MC === 1) {
client.ItemManager.getTokens(users[testAccounts[0].name.toLowerCase()].character, ['BWL']).then(tokens => {
client.ItemManager.getTokens(users[testAccounts[0].name.toLowerCase()].character, ['BWL'], true).then(tokens => {
if (tokens!.length === 0) {
done()
} else {
@@ -652,7 +644,7 @@ describe('Frontcraft', () => {
}
const user = Object.values(users)[0]
const createRaid = adminClient.manageRaid.createRaid
const sign = async (raid: Raid, late = false) => await adminClient.signup.sign(user.auth.token.value, user.character, raid, late)
const sign = async (raid: Raid, late = false) => await adminClient.signup.sign(user.auth.token.value, user.character, raid, late, false)
const buyToken = async (signup: Signup, itemname: string) => await client.ItemManager.buyToken(user.auth.token.value, user.character.charactername, itemname, signup)
const getCurrency = async (tier: Tiers) => {
const dbUser = await client.UserManager.getUser(user.account.username)
@@ -661,7 +653,6 @@ describe('Frontcraft', () => {
createRaid(Raid(0, 'BWL')).then(async (BWL0: Raid) => {
const T2_0 = await client.ItemManager.getItem(T2[0])
//const BWL0 = await createRaid(Raid(0, 'BWL'))
const signupBWL0 = await sign(BWL0)
let BWL = await getCurrency(BWL0.tier)
let token = await buyToken(signupBWL0, T2[0])
@@ -676,14 +667,26 @@ describe('Frontcraft', () => {
let reserves = await client.ItemManager.getTokens(user.character, [BWL0.tier], true)
let streaks = await client.ItemManager.getTokens(user.character, [BWL0.tier], false)
if (reserves!.length != 1
|| streaks!.length != 0
|| reserves![0].itemname !== T2_0!.itemname
|| reserves![0].level !== 1) {
console.log("Bad Token status 1", reserves, streaks);
done(new Error("Bad Token status"))
return
if (reserves!.length != 1){
console.log("Expected reserves to be of length 1", reserves);
done(new Error("Bad token status"))
}
if(streaks!.length != 0){
console.log("Expected streaks to be of length 0", streaks);
done(new Error("Bad token status"))
}
if(reserves![0].itemname !== T2_0!.itemname){
console.log("Expected reserve to to be of item "+T2_0!.itemname, reserves![0]);
done(new Error("Bad token status"))
}
if(reserves![0].level !== 2){
console.log("Expected reserve to to be of level "+2, reserves![0].level);
done(new Error("Bad Token status"))
}
await adminClient.manageRaid.startRaid(BWL0)
reserves = await client.ItemManager.getTokens(user.character, [BWL0.tier], true)
streaks = await client.ItemManager.getTokens(user.character, [BWL0.tier], false)
@@ -691,7 +694,7 @@ describe('Frontcraft', () => {
|| streaks!.length != 1
|| streaks![0].itemname !== T2[0]
|| streaks![0].level !== 1) {
console.log("Bad Token status", reserves, streaks);
console.log("Bad Token status 2", reserves, streaks);
done(new Error("Bad Token status 2"))
return
}
@@ -726,8 +729,8 @@ describe('Frontcraft', () => {
if (reserves!.length != 1
|| streaks!.length != 0
|| reserves![0].itemname !== T2[1]
|| reserves![0].level !== 1) {
console.log("Bad Token status", reserves, streaks);
|| reserves![0].level !== 2) {
console.log("Bad Token status 3", reserves, streaks);
done(new Error("Bad Token status 3"))
return
}