From 441eeadaf3bde6dc96c48f5a07818348802e75f1 Mon Sep 17 00:00:00 2001 From: undefined Date: Wed, 24 Jun 2020 13:39:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E7=9B=AE=E6=90=9C=E7=B4=A2=EF=BC=8C?= =?UTF-8?q?=E6=94=B6=E8=97=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/hack.js | 15 -------- hydro/handler/home.js | 19 ++++++++-- hydro/handler/import.js | 20 ++++++----- hydro/handler/problem.js | 35 +++++++++++++------ hydro/handler/training.js | 8 ++--- hydro/lib/download.js | 24 +++++++------ hydro/lib/hpm.js | 4 +-- hydro/model/discussion.js | 12 +++++-- hydro/model/file.js | 2 +- hydro/model/problem.js | 9 +++-- hydro/model/setting.js | 1 + hydro/service/server.js | 14 +++++--- module/migrate-vijos/hydro.json | 2 +- module/migrate-vijos/script.js | 8 ++++- module/problem-import-syzoj/hydro.json | 2 +- module/problem-import-syzoj/lib.js | 8 ++--- package.json | 8 ++--- templates/discussion_main_or_node.html | 1 + templates/main.html | 6 ++-- .../partials/discussion_nodes_widget.html | 17 +++++++++ templates/problem_main.html | 4 +-- templates/training_detail.html | 4 +-- yarn.lock | 32 ++++++++--------- 23 files changed, 158 insertions(+), 97 deletions(-) create mode 100644 templates/partials/discussion_nodes_widget.html diff --git a/build/hack.js b/build/hack.js index 304357028..6b040a658 100644 --- a/build/hack.js +++ b/build/hack.js @@ -34,19 +34,4 @@ module.exports = { console.error('Cannot hack yargs'); } }, - 'markdown-it-katex': () => { - const p = require.resolve('markdown-it-katex'); - const file = fs.readFileSync(p).toString().split('\n'); - if (file[27].includes('if (prevChar === 0x20/* " " */ || prevChar === 0x09/* \\t */ ||')) { - file[27] = 'if (prevChar === 0x09/* \\t */ ||'; - } else if (!file[27].includes('if (prevChar === 0x09/* \\t */ ||')) { - console.error('Cannot hack markdown-it-katex'); - } - if (file[31].includes('if (nextChar === 0x20/* " " */ || nextChar === 0x09/* \\t */) {')) { - file[31] = 'if (nextChar === 0x09/* \\t */) {'; - } else if (!file[27].includes('if (nextChar === 0x09/* \\t */) {')) { - console.error('Cannot hack markdown-it-katex'); - } - fs.writeFileSync(p, file.join('\n')); - }, }; diff --git a/hydro/handler/home.js b/hydro/handler/home.js index 702c504b5..6035ca0f7 100644 --- a/hydro/handler/home.js +++ b/hydro/handler/home.js @@ -14,6 +14,7 @@ const document = require('../model/document'); const system = require('../model/system'); const user = require('../model/user'); const setting = require('../model/setting'); +const domain = require('../model/domain'); const discussion = require('../model/discussion'); const token = require('../model/token'); const training = require('../model/training'); @@ -87,10 +88,24 @@ class HomeHandler extends Handler { this.homework(domainId), this.contest(domainId), this.training(domainId), this.discussion(domainId), ]); - const udict = await user.getList(domainId, ddocs.map((ddoc) => ddoc.owner)); + const [udict, dodoc, vnodes] = await Promise.all([ + user.getList(domainId, ddocs.map((ddoc) => ddoc.owner)), + domain.get(domainId), + discussion.getNodes(domainId), + ]); this.response.template = 'main.html'; this.response.body = { - htdocs, htsdict, tdocs, tsdict, trdocs, trsdict, ddocs, vndict, udict, + htdocs, + htsdict, + tdocs, + tsdict, + trdocs, + trsdict, + ddocs, + vndict, + udict, + domain: dodoc, + vnodes, }; } } diff --git a/hydro/handler/import.js b/hydro/handler/import.js index dd92b5271..9aac00ef0 100644 --- a/hydro/handler/import.js +++ b/hydro/handler/import.js @@ -32,16 +32,18 @@ class ProblemImportHandler extends Handler { if (pid) pdoc.pid = pid; if (hidden) pdoc.hidden = true; const docId = await problem.add(domainId, pdoc.title, pdoc.content, this.user._id, pdoc); - const file = path.resolve(os.tmpdir(), 'hydro', `import_${domainId}_${pid}.zip`); - const w = fs.createWriteStream(file); - await new Promise((resolve, reject) => { - w.on('finish', resolve); - w.on('error', reject); - testdata.pipe(w); - }); - await problem.setTestdata(domainId, docId, file); + if (testdata) { + const file = path.resolve(os.tmpdir(), 'hydro', `import_${domainId}_${pid || pdoc.pid || docId}.zip`); + const w = fs.createWriteStream(file); + await new Promise((resolve, reject) => { + w.on('finish', resolve); + w.on('error', reject); + testdata.pipe(w); + }); + await problem.setTestdata(domainId, docId, file); + } this.response.body = { pid: pid || docId }; - this.response.redirect = `/p/${pid || docId}/settings`; + this.response.redirect = this.url('problem_settings', { pid: pid || docId }); } } diff --git a/hydro/handler/problem.js b/hydro/handler/problem.js index 1d3fb63ca..881c02cfd 100644 --- a/hydro/handler/problem.js +++ b/hydro/handler/problem.js @@ -27,14 +27,23 @@ class ProblemHandler extends Handler { this.checkPerm(PERM_VIEW_PROBLEM); } - async get({ domainId, page = 1, category = '' }) { + async get({ domainId, page = 1, q = '' }) { this.response.template = 'problem_main.html'; - const q = {}; + const query = {}; let psdict = {}; - if (category) q.$or = [{ category }, { tag: category }]; - if (!this.user.hasPerm(PERM_VIEW_PROBLEM_HIDDEN)) q.hidden = false; + const path = [ + ['Hydro', 'homepage'], + ['problem_main', null], + ]; + if (q) { + q = q.toLowerCase(); + const $regex = new RegExp(`\\A\\Q${q.replace(/\\E/gmi, /\\E\\E\\Q/gmi)}\\E`, 'gmi'); + query.title = { $regex }; + path.push([q, null, null, true]); + } + if (!this.user.hasPerm(PERM_VIEW_PROBLEM_HIDDEN)) query.hidden = false; const [pdocs, ppcount, pcount] = await paginate( - problem.getMulti(domainId, q).sort({ pid: 1 }), + problem.getMulti(domainId, query).sort({ pid: 1 }), page, await system.get('PROBLEM_PER_PAGE'), ); @@ -43,15 +52,21 @@ class ProblemHandler extends Handler { domainId, this.user._id, pdocs.map((pdoc) => pdoc.docId), ); } - const path = [ - ['Hydro', 'homepage'], - ['problem_main', null], - ]; this.response.body = { - path, page, pcount, ppcount, pdocs, psdict, category, + path, page, pcount, ppcount, pdocs, psdict, category: q, }; } + async postStar({ domainId, pid }) { + await problem.setStar(domainId, pid, this.user._id, true); + this.back({ star: true }); + } + + async postUnstar({ domainId, pid }) { + await problem.setStar(domainId, pid, this.user._id, false); + this.back({ star: false }); + } + async cleanup() { if (this.response.template === 'problem_main.html' && this.preferJson) { const { diff --git a/hydro/handler/training.js b/hydro/handler/training.js index 5f06d5bdd..981d03879 100644 --- a/hydro/handler/training.js +++ b/hydro/handler/training.js @@ -102,7 +102,7 @@ class TrainingDetailHandler extends TrainingHandler { const tdoc = await training.get(domainId, tid); const pids = training.getPids(tdoc); const f = this.user.hasPerm(PERM_VIEW_PROBLEM_HIDDEN) ? {} : { hidden: false }; - const [udoc, pdict] = await Promise.all([ + const [owner, pdict] = await Promise.all([ user.getById(domainId, tdoc.owner), problem.getList(domainId, pids, f), ]); @@ -146,7 +146,7 @@ class TrainingDetailHandler extends TrainingHandler { ]; this.response.template = 'training_detail.html'; this.response.body = { - path, tdoc, tsdoc, pids, pdict, psdict, ndict, nsdict, udoc, + path, tdoc, tsdoc, pids, pdict, psdict, ndict, nsdict, owner, }; } @@ -193,7 +193,7 @@ class TrainingCreateHandler extends TrainingHandler { } const tid = await training.add(domainId, title, content, this.user._id, dag, description); this.response.body = { tid }; - this.response.redirect = `/t/${tid}`; + this.response.redirect = this.url('training_detail', { tid }); } } @@ -245,7 +245,7 @@ class TrainingEditHandler extends TrainingHandler { title, content, dag, description, }); this.response.body = { tid }; - this.response.redirect = `/t/${tid}`; + this.response.redirect = this.url('training_detail', { tid }); } } diff --git a/hydro/lib/download.js b/hydro/lib/download.js index cffb5d43e..a9f1b49ff 100644 --- a/hydro/lib/download.js +++ b/hydro/lib/download.js @@ -1,17 +1,19 @@ const superagent = require('superagent'); const fs = require('fs'); -async function download(url, path, retry = 3) { - if (path) { - const w = await fs.createWriteStream(path); - await superagent.get(url).retry(retry).pipe(w); - await new Promise((resolve, reject) => { - w.on('finish', resolve); - w.on('error', reject); - }); - return path; - } - return superagent.get(url); +async function _download(url, path, retry) { + const w = fs.createWriteStream(path); + await superagent.get(url).retry(retry).pipe(w); + await new Promise((resolve, reject) => { + w.on('finish', resolve); + w.on('error', reject); + }); + return path; +} + +function download(url, path, retry = 3) { + if (path) return _download(url, path, retry); + return superagent.get(url).retry(retry); } global.Hydro.lib.download = module.exports = download; diff --git a/hydro/lib/hpm.js b/hydro/lib/hpm.js index e9af4bacf..4c1eae2f9 100644 --- a/hydro/lib/hpm.js +++ b/hydro/lib/hpm.js @@ -60,8 +60,8 @@ async function del(id) { fs.unlinkSync(root(`${moduleRoot}/${id}.hydro`)); } -async function install(url) { - await download(url, root(`${moduleRoot}/${String.random(16)}.hydro`)); +function install(url) { + return download(url, root(`${moduleRoot}/${String.random(16)}.hydro`)); } global.Hydro.lib.hpm = module.exports = { diff --git a/hydro/model/discussion.js b/hydro/model/discussion.js index c31d702cf..af8f568a9 100644 --- a/hydro/model/discussion.js +++ b/hydro/model/discussion.js @@ -123,8 +123,11 @@ function getStatus(domainId, did, uid) { return document.getStatus(domainId, document.TYPE_DISCUSSION, did, uid); } -function addNode(domainId, _id, category) { - return document.add(domainId, category, 1, document.TYPE_DISCUSSION_NODE, _id); +function addNode(domainId, _id, category, args) { + return document.add( + domainId, category, 1, document.TYPE_DISCUSSION_NODE, + _id, null, null, args, + ); } function getNode(domainId, _id) { @@ -166,6 +169,10 @@ async function getVnode(domainId, ddoc, handler) { }; } +function getNodes(domainId) { + return document.getMulti(domainId, document.TYPE_DISCUSSION_NODE).toArray(); +} + async function getListVnodes(domainId, ddocs, handler) { const tasks = []; const res = {}; @@ -201,6 +208,7 @@ global.Hydro.model.discussion = module.exports = { setStar, getStatus, addNode, + getNodes, getVnode, getListVnodes, }; diff --git a/hydro/model/file.js b/hydro/model/file.js index 8e4b3cc7f..04038f5b9 100644 --- a/hydro/model/file.js +++ b/hydro/model/file.js @@ -15,7 +15,7 @@ function _timestamp() { async function add(streamOrPath, filename, meta = {}) { if (typeof streamOrPath === 'string') streamOrPath = fs.createReadStream(streamOrPath); const w = gridfs.openUploadStream(filename); - await coll.insertOne({ ...meta, _id: w.id }); + await coll.insertOne({ ...meta, _id: w.id, secret: String.random(32) }); await new Promise((resolve, reject) => { w.on('error', reject); w.on('finish', resolve); diff --git a/hydro/model/problem.js b/hydro/model/problem.js index 6a58c4e81..edb0c06d4 100644 --- a/hydro/model/problem.js +++ b/hydro/model/problem.js @@ -31,7 +31,6 @@ async function add(domainId, title, content, owner, { }) { const d = await domain.inc(domainId, 'pidCounter', 1); if (!pid) pid = d.pidCounter.toString(); - // eslint-disable-next-line no-return-await return await document.add( domainId, content, owner, document.TYPE_PROBLEM, d.pidCounter, null, null, { @@ -47,6 +46,7 @@ async function add(domainId, title, content, owner, { * @returns {Promise} */ async function get(domainId, pid, uid = null, doThrow = true) { + if (!Number.isNaN(parseInt(pid, 10))) pid = parseInt(pid, 10); const pdoc = Number.isInteger(pid) ? await document.get(domainId, document.TYPE_PROBLEM, pid) : (await document.getMulti(domainId, document.TYPE_PROBLEM, { pid }).toArray())[0]; @@ -95,7 +95,7 @@ function getMultiStatus(domainId, query) { * @param {string} domainId * @param {ObjectID} _id * @param {object} query - * @returns {Pdoc} + * @returns {Promise} */ function edit(domainId, _id, $set) { return document.set(domainId, document.TYPE_PROBLEM, _id, $set); @@ -156,6 +156,10 @@ async function updateStatus(domainId, pid, uid, rid, status) { return true; } +function setStar(domainId, pid, uid, star) { + return document.setStatus(domainId, document.TYPE_PROBLEM, pid, uid, { star }); +} + async function setTestdata(domainId, _id, filePath) { const pdoc = await get(domainId, _id); const config = await readConfig(filePath); @@ -176,6 +180,7 @@ global.Hydro.model.problem = module.exports = { getList, getListStatus, getMultiStatus, + setStar, setTestdata, updateStatus, }; diff --git a/hydro/model/setting.js b/hydro/model/setting.js index 084bc3574..dac828e73 100644 --- a/hydro/model/setting.js +++ b/hydro/model/setting.js @@ -102,6 +102,7 @@ SystemSetting( Setting('setting_server', 'server.host', null, null, 'text', 'Server Host'), Setting('setting_server', 'server.url', null, null, 'text', 'Server BaseURL'), Setting('setting_server', 'server.port', null, 8888, 'number', 'Server Port'), + Setting('setting_server', 'server.log', null, false, 'checkbox', 'Disable Access Log'), Setting('setting_oauth', 'oauth.githubappid', null, null, 'text', 'Github Oauth AppID'), Setting('setting_oauth', 'oauth.githubsecret', null, null, 'text', 'Github Oauth Secret'), Setting('setting_oauth', 'oauth.googleappid', null, null, 'text', 'Google Oauth ClientID'), diff --git a/hydro/service/server.js b/hydro/service/server.js index 709859156..45b5506f2 100644 --- a/hydro/service/server.js +++ b/hydro/service/server.js @@ -23,6 +23,8 @@ const { UserFacingError, ValidationError, } = require('../error'); +let enableLog = true; + const app = new Koa(); let server; const router = new Router(); @@ -153,7 +155,7 @@ class Handler { } async renderHTML(name, context) { - console.time(name); + if (enableLog) console.time(name); this.hasPerm = (perm) => this.user.hasPerm(perm); const res = await template.render(name, Object.assign(context, { handler: this, @@ -161,7 +163,7 @@ class Handler { _: (str) => (str ? str.toString().translate(this.user.viewLang || this.session.viewLang) : ''), user: this.user, })); - console.timeEnd(name); + if (enableLog) console.timeEnd(name); return res; } @@ -266,6 +268,7 @@ class Handler { try { await this.renderBody(); } catch (error) { + this.response.status = error instanceof UserFacingError ? error.code : 500; if (this.preferJson) this.response.body = { error }; else await this.render(error instanceof UserFacingError ? 'error.html' : 'bsod.html', { error }); } @@ -342,6 +345,7 @@ class Handler { async onerror(error) { console.error(error.message, error.params); console.error(error.stack); + this.response.status = error instanceof UserFacingError ? error.code : 500; this.response.template = error instanceof UserFacingError ? 'error.html' : 'bsod.html'; this.response.body = { error: { message: error.message, params: error.params, stack: error.stack }, @@ -526,10 +530,12 @@ function Validate(key, func) { } async function start() { - app.use(morgan(':method :url :status :res[content-length] - :response-time ms')); + const [disableLog, port] = await system.getMany(['server.log', 'server.port']); + if (!disableLog) { + app.use(morgan(':method :url :status :res[content-length] - :response-time ms')); + } else enableLog = false; app.use(router.routes()).use(router.allowedMethods()); Route('notfound_handler', '*', Handler); - const port = await system.get('server.port'); server.listen(port); console.log('Server listening at: %s', port); } diff --git a/module/migrate-vijos/hydro.json b/module/migrate-vijos/hydro.json index c51d5d981..0056c31a7 100644 --- a/module/migrate-vijos/hydro.json +++ b/module/migrate-vijos/hydro.json @@ -1,5 +1,5 @@ { "id": "migrate-vijos", - "version": "0.0.1", + "version": "1.0.0", "description": "Migrate From Vijos" } \ No newline at end of file diff --git a/module/migrate-vijos/script.js b/module/migrate-vijos/script.js index cfa209c3c..fa14f9239 100644 --- a/module/migrate-vijos/script.js +++ b/module/migrate-vijos/script.js @@ -236,7 +236,13 @@ async function discussionNode(src, report) { const category = item[0]; const nodes = item[1]; for (const node of nodes || []) { - t.push(discussion.addNode(doc.domain_id, node.name, category)); + if (node.pic) { + t.push(discussion.addNode( + doc.domain_id, node.name, category, { pic: node.pic }, + )); + } else { + t.push(discussion.addNode(doc.domain_id, node.name, category)); + } } } await Promise.all(t).catch((e) => e); diff --git a/module/problem-import-syzoj/hydro.json b/module/problem-import-syzoj/hydro.json index 9a66734f3..1907311c5 100644 --- a/module/problem-import-syzoj/hydro.json +++ b/module/problem-import-syzoj/hydro.json @@ -1,5 +1,5 @@ { "id": "problem-import-syzoj", - "version": "1.0.0", + "version": "1.0.1", "description": "Import problem from syzoj." } \ No newline at end of file diff --git a/module/problem-import-syzoj/lib.js b/module/problem-import-syzoj/lib.js index bf880d106..62b9f5a4c 100644 --- a/module/problem-import-syzoj/lib.js +++ b/module/problem-import-syzoj/lib.js @@ -11,8 +11,8 @@ async function syzoj(url, handler) { const [, host, pid] = RE_SYZOJ.exec(url); const res = await superagent.get(`${url}export`); assert(res.status === 200, new RemoteOnlineJudgeError('Cannot connect to target server')); - assert(res.data.success, new RemoteOnlineJudgeError((res.data.error || {}).message)); - const p = res.data.obj; + assert(res.body.success, new RemoteOnlineJudgeError((res.body.error || {}).message)); + const p = res.body.obj; const content = []; if (p.description) { content.push( @@ -64,8 +64,8 @@ async function syzoj(url, handler) { type: p.type, }, }; - const r = await download(`${url}testdata/download`); + const r = download(`${url}testdata/download`); return [pdoc, r]; } -global.Hydro.lib['import.syzoj'] = syzoj; +global.Hydro.lib['import.syzoj'] = module.exports = syzoj; diff --git a/package.json b/package.json index 3a351e136..d2512839b 100644 --- a/package.json +++ b/package.json @@ -6,14 +6,14 @@ "author": "masnn", "license": "GPL-3.0-only", "dependencies": { - "@hydrooj/markdown-it-katex": "^2.1.0", - "adm-zip": "^0.4.14", + "@hydrooj/markdown-it-katex": "^2.1.1", + "adm-zip": "^0.4.16", "ansi_up": "^4.0.4", "bson": "^4.0.2", "detect-browser": "^5.1.1", "eslint": "7.2.0", "js-yaml": "^3.13.1", - "koa": "^2.12.1", + "koa": "^2.13.0", "koa-body": "^4.2.0", "koa-morgan": "^1.0.1", "koa-router": "^8.0.8", @@ -31,7 +31,7 @@ "nodemailer": "^6.4.10", "nunjucks": "^3.2.1", "prismjs": "^1.20.0", - "snyk": "^1.346.0", + "snyk": "^1.348.1", "sockjs": "^0.3.20", "superagent": "^5.2.2", "superagent-proxy": "^2.0.0", diff --git a/templates/discussion_main_or_node.html b/templates/discussion_main_or_node.html index ee83c8048..4f57a83ef 100644 --- a/templates/discussion_main_or_node.html +++ b/templates/discussion_main_or_node.html @@ -38,6 +38,7 @@ {% endif %} + {% include 'partials/discussion_nodes_widget.html' %} {% endblock %} diff --git a/templates/main.html b/templates/main.html index 70d2322ce..b985adea3 100644 --- a/templates/main.html +++ b/templates/main.html @@ -3,12 +3,12 @@ {% extends "layout/basic.html" %} {% import "components/contest.html" as contest with context %} {% block content %} -{% if system['bulletin'] %} +{% if domain['bulletin'] %}
- {{ system['bulletin']|markdown }} + {{ domain['bulletin']|markdown|safe }}
@@ -158,7 +158,7 @@
{% if handler.hasPerm(perm.PERM_VIEW_DISCUSSION) %} - {#{% include 'discussion_nodes_widget.html' %} // TODO(masnn) #} + {% include 'partials/discussion_nodes_widget.html' %} {% endif %}
diff --git a/templates/partials/discussion_nodes_widget.html b/templates/partials/discussion_nodes_widget.html new file mode 100644 index 000000000..0e40c458a --- /dev/null +++ b/templates/partials/discussion_nodes_widget.html @@ -0,0 +1,17 @@ +
+
+

{{ _('Discussion Nodes') }}

+
+
    + {%- for category, nodes in vnodes|groupby('content') -%} +
  • +

    {{ category }}

    +
      + {%- for node in nodes -%} +
    1. {{ node.docId }}
    2. + {%- endfor -%} +
    +
  • + {%- endfor -%} +
+
\ No newline at end of file diff --git a/templates/problem_main.html b/templates/problem_main.html index fd2ff6bea..2bd791573 100644 --- a/templates/problem_main.html +++ b/templates/problem_main.html @@ -50,10 +50,10 @@

{{ _('Search') }}

-
+
diff --git a/templates/training_detail.html b/templates/training_detail.html index 42d93f3b0..390fe122a 100644 --- a/templates/training_detail.html +++ b/templates/training_detail.html @@ -153,9 +153,7 @@
{% endfor %} -
 
-
@@ -194,7 +192,7 @@ {% endif %}
{{ _('Enrollees') }}
{{ tdoc['enroll']|default(0) }}
{{ _('Created By') }}
-
{{ user.render_inline(owner_udoc, badge=false) }}
+
{{ user.render_inline(owner, badge=false) }}
diff --git a/yarn.lock b/yarn.lock index 3a7bef740..b410e05e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,10 +23,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@hydrooj/markdown-it-katex@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@hydrooj/markdown-it-katex/-/markdown-it-katex-2.1.0.tgz#6f7bddafff876327359bd41069767793ff7bd964" - integrity sha512-17b6Vd6ZNzRFkz3BKf+je2xJBfDhFYV46TbBwrpS6CGflIV2X41zv+a9n2/Sidn9E9JSYeEMtmVkM8jQx1HpKA== +"@hydrooj/markdown-it-katex@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@hydrooj/markdown-it-katex/-/markdown-it-katex-2.1.1.tgz#0b656483b912593e2a927360592462770e329f25" + integrity sha512-uOinvM64Y8XPxbsLLPHcOYt0A6eBqnZQUkN6ynWu/pLwD+a3pPnKvBhBi+BHETMGPMJpxXiAWGgs5qqnVN8Hvg== dependencies: katex "^0.11.1" @@ -479,10 +479,10 @@ acorn@^7.2.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.3.1.tgz#85010754db53c3fbaf3b9ea3e083aa5c5d147ffd" integrity sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA== -adm-zip@^0.4.14: - version "0.4.14" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.14.tgz#2cf312bcc9f8875df835b0f6040bd89be0a727a9" - integrity sha512-/9aQCnQHF+0IiCl0qhXoK7qs//SwYE7zX8lsr/DNk1BRAHYxeLZPL4pguwK29gUEqasYQjqPtEpDRSWEkdHn9g== +adm-zip@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== agent-base@4, agent-base@^4.2.0, agent-base@^4.3.0: version "4.3.0" @@ -3195,10 +3195,10 @@ koa-static-cache@^5.1.3: mime-types "^2.1.8" mz "^2.7.0" -koa@^2.12.1: - version "2.12.1" - resolved "https://registry.yarnpkg.com/koa/-/koa-2.12.1.tgz#a0ab4dcfebe3cc1b6f0875cbfd686edd7e926643" - integrity sha512-NuYVKjnBxeEe19VljPO9yNcaKKVrMagcax3jjzZtOlxRY2nThWKQqgnI3Pr1OG7mFtvySoDRixoUWZIt6R9C3A== +koa@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/koa/-/koa-2.13.0.tgz#25217e05efd3358a7e5ddec00f0a380c9b71b501" + integrity sha512-i/XJVOfPw7npbMv67+bOeXr3gPqOAw6uh5wFyNs3QvJ47tUx3M3V9rIE0//WytY42MKz4l/MXKyGkQ2LQTfLUQ== dependencies: accepts "^1.3.5" cache-content-type "^1.0.0" @@ -5120,10 +5120,10 @@ snyk-try-require@1.3.1, snyk-try-require@^1.1.1, snyk-try-require@^1.3.1: lru-cache "^4.0.0" then-fs "^2.0.0" -snyk@^1.346.0: - version "1.346.0" - resolved "https://registry.yarnpkg.com/snyk/-/snyk-1.346.0.tgz#c94646a7ca109a329095419542df92d10df9709f" - integrity sha512-uwJDC0CRefppngm1J1M+Sja5CVfdmzLYkxGYp3ZYXrzvd912pgzrdYm8ciUL5a8x1/C+2L0iZ09W68daSuObhA== +snyk@^1.348.1: + version "1.348.1" + resolved "https://registry.yarnpkg.com/snyk/-/snyk-1.348.1.tgz#c2eeaa1fd37a0ed8a6ae8a614780d5a006083402" + integrity sha512-jDOUUoJzemIrhIQuUerS1drMY+Ijq1WtE+K2yLhKUgYo6tJnCpqSwIuuJREjeiQ2Q7zRmjlT+iD5owKdEaJR1w== dependencies: "@snyk/cli-interface" "2.8.0" "@snyk/dep-graph" "1.18.3"