mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
upgrade deps
This commit is contained in:
1 parent
2814bb51b9
commit
680f8e58dd
13 files changed
+33
-27
No files matched your search
+1
-1
@@ -45,7 +45,7 @@
|
||||
"ora": "^5.4.0",
|
||||
"semver": "^7.3.5",
|
||||
"ts-jest": "^26.5.4",
|
||||
"typescript": "4.2.3",
|
||||
"typescript": "4.2.4",
|
||||
"yargs": "^16.2.0"
|
||||
}
|
||||
}
|
||||
@@ -14,9 +14,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/xml2js": "^0.4.8",
|
||||
"bson": "^4.2.3"
|
||||
"bson": "^4.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hydrooj": "^2.20.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"@hydrooj/utils": "^1.0.0",
|
||||
"adm-zip": "^0.5.5",
|
||||
"axios": "^0.21.1",
|
||||
"bson": "^4.2.3",
|
||||
"bson": "^4.3.0",
|
||||
"fs-extra": "^9.1.0",
|
||||
"js-yaml": "^4.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"dependencies": {
|
||||
"@hydrooj/utils": "^1.0.1",
|
||||
"adm-zip": "^0.5.5",
|
||||
"ansi_up": "^5.0.0",
|
||||
"ansi_up": "^5.0.1",
|
||||
"cookies": "^0.8.0",
|
||||
"detect-browser": "^5.1.1",
|
||||
"fs-extra": "^9.1.0",
|
||||
@@ -22,13 +22,13 @@
|
||||
"koa": "^2.13.1",
|
||||
"koa-body": "^4.2.0",
|
||||
"koa-compress": "^5.0.1",
|
||||
"koa-proxies": "^0.11.0",
|
||||
"koa-proxies": "^0.12.1",
|
||||
"koa-router": "^10.0.0",
|
||||
"koa-static-cache": "^5.1.3",
|
||||
"lodash": "^4.17.21",
|
||||
"minio": "7.0.17",
|
||||
"minio": "7.0.18",
|
||||
"moment-timezone": "^0.5.32",
|
||||
"mongodb": "^3.6.5",
|
||||
"mongodb": "^3.6.6",
|
||||
"nodemailer": "^6.5.0",
|
||||
"p-queue": "^6.6.2",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
"@types/mongodb": "^3.6.12"
|
||||
},
|
||||
"dependencies": {
|
||||
"mongodb": "^3.6.5"
|
||||
"mongodb": "^3.6.6"
|
||||
}
|
||||
}
|
||||
@@ -111,20 +111,24 @@ class MarkdownHandler extends Handler {
|
||||
}
|
||||
}
|
||||
|
||||
const getUrl = (files) => files.map((i) => {
|
||||
const getHash = (i) => {
|
||||
const shasum = crypto.createHash('sha1');
|
||||
const file = readFileSync(join(tmpdir(), 'hydro', 'public', i));
|
||||
shasum.update(file);
|
||||
const hash = shasum.digest('hex').substr(0, 10);
|
||||
return `/${i}?${hash}`;
|
||||
});
|
||||
return shasum.digest('hex').substr(0, 10);
|
||||
};
|
||||
|
||||
const getUrl = (files) => files.map((i) => `/${i}?${getHash(i)}`);
|
||||
|
||||
bus.on('app/started', () => {
|
||||
const files = readdirSync(join(tmpdir(), 'hydro', 'public'));
|
||||
const pages = files.filter((file) => file.endsWith('.page.js'));
|
||||
const themes = files.filter((file) => file.endsWith('.theme.js'));
|
||||
UiContextBase.extraPages = getUrl(pages);
|
||||
UiContextBase.themes = getUrl(themes);
|
||||
UiContextBase.themes = {};
|
||||
for (const theme of themes) {
|
||||
UiContextBase.themes[theme] = `/${theme}?${getHash(theme)}`;
|
||||
}
|
||||
});
|
||||
|
||||
global.Hydro.handler.ui = async () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.5.12",
|
||||
"version": "4.5.13",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
@@ -26,7 +26,7 @@
|
||||
"acorn": "^8.0.5",
|
||||
"acorn-stage3": "^4.0.0",
|
||||
"acorn-walk": "^8.0.2",
|
||||
"astring": "^1.7.3",
|
||||
"astring": "^1.7.4",
|
||||
"autoprefixer": "^9.8.6",
|
||||
"babel-loader": "^8.2.2",
|
||||
"babel-plugin-lodash": "^3.3.4",
|
||||
@@ -104,7 +104,7 @@
|
||||
"dependencies": {
|
||||
"98.css": "^0.1.16",
|
||||
"js-yaml": "^4.0.0",
|
||||
"katex": "^0.13.1",
|
||||
"katex": "^0.13.2",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-it": "^12.0.4",
|
||||
"markdown-it-anchor": "^7.1.0",
|
||||
|
||||
@@ -216,7 +216,7 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor
|
||||
async function loadSubjective() {
|
||||
try {
|
||||
const props = yaml.load(base64.decode(document.getElementsByClassName('section__body typo')[0].innerText));
|
||||
$('.loader-container').show();
|
||||
$('.outer-loader-container').show();
|
||||
const { default: Subjective } = await import('vj/components/subjective-question/index');
|
||||
const React = await import('react');
|
||||
const ReactDOM = await import('react-dom');
|
||||
@@ -227,11 +227,9 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor
|
||||
</div>,
|
||||
$('.problem-content').get(0),
|
||||
);
|
||||
$('.loader-container').hide();
|
||||
$('.outer-loader-container').hide();
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
} catch (e) { }
|
||||
}
|
||||
|
||||
$(document).on('click', '[name="problem-sidebar__open-scratchpad"]', (ev) => {
|
||||
|
||||
@@ -26,7 +26,10 @@
|
||||
<meta property="og:url" content="{{ handler.ctx.request.href }}" />
|
||||
<meta property="og:image" content="{{ static_url('favicon-96x96.png') }}" />
|
||||
{% endblock %}
|
||||
<link rel="stylesheet" media="all" href="{{ static_url(handler.user.theme|default('default') + '.theme.js') }}">
|
||||
{% if not isIE(handler.request.headers['user-agent']) %}
|
||||
<script src="{{ static_url(handler.user.theme|default('default') + '.theme.js') }}"></script>
|
||||
{% endif %}
|
||||
<link rel="stylesheet" media="all" href="{{ static_url(handler.user.theme|default('default') + '.theme.css') }}">
|
||||
<link rel="stylesheet" media="all" href="{{ url('ui_extracss') }}">
|
||||
<title>{{ handler.renderTitle(page_name) }}</title>
|
||||
{% if not isIE(handler.request.headers['user-agent']) %}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<span><span class="icon icon-global"></span> Theme <span class="icon icon-expand_less"></span></span>
|
||||
<ol class="dropdown-target menu" id="menu-footer-theme">
|
||||
{%- for k in UiContext.themes -%}
|
||||
<li class="menu__item"><a class="menu__link" href="{{ url('set_theme', theme=k) }}">{{ k }}</a></li>
|
||||
<li class="menu__item"><a class="menu__link" href="{{ url('set_theme', id=k) }}">{{ k }}</a></li>
|
||||
{%- endfor -%}
|
||||
</ol>
|
||||
</li>
|
||||
|
||||
@@ -47,8 +47,9 @@
|
||||
{% include "partials/problem_sidebar.html" %}
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:none" class="loader-container"><div class="loader"></div></div>
|
||||
<div style="display:none" class="outer-loader-container"><div class="loader"></div></div>
|
||||
<div class="scratchpad-container" style="display:none">
|
||||
<div style="display:none" class="loader-container"><div class="loader"></div></div>
|
||||
<div id="scratchpad" style="opacity:0"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -26,4 +26,4 @@ import 'vj/components/katex/katex.styl';
|
||||
const pageStyleReq = require.context('../', true, /\.page\.styl$/i);
|
||||
pageStyleReq.keys().map((key) => pageStyleReq(key));
|
||||
const pageStyleReqDefault = require.context('../', true, /\.page\.default\.styl$/i);
|
||||
pageStyleReqDefault.keys().map((key) => pageStyleReq(key));
|
||||
pageStyleReqDefault.keys().map((key) => pageStyleReqDefault(key));
|
||||
@@ -7,7 +7,7 @@
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0-only",
|
||||
"dependencies": {
|
||||
"bson": "^4.2.3",
|
||||
"bson": "^4.3.0",
|
||||
"moment": "^2.29.1",
|
||||
"systeminformation": "^5.6.10"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user