mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
gitpod support
This commit is contained in:
1 parent
8b5107fefa
commit
539b47d55b
5 files changed
+20
-5
No files matched your search
+12
@@ -0,0 +1,12 @@
|
|||||||
|
image: gitpod/mongodb
|
||||||
|
tasks:
|
||||||
|
- init: yarn && yarn build
|
||||||
|
vscode:
|
||||||
|
extensions:
|
||||||
|
- dbaeumer.vscode-eslint@2.1.3:1NRvj3UKNTNwmYjptmUmIw==
|
||||||
|
- vscode-icons-team.vscode-icons@10.2.0:DrQUJPtFm0woSFiyitha8Q==
|
||||||
|
ports:
|
||||||
|
- port: 8888
|
||||||
|
onOpen: open-preview
|
||||||
|
- port: 27017
|
||||||
|
onOpen: open-mongodb
|
||||||
Vendored
+1
-3
@@ -1,8 +1,6 @@
|
|||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"dbaeumer.vscode-eslint",
|
"dbaeumer.vscode-eslint",
|
||||||
"gruntfuggly.todo-tree",
|
"gruntfuggly.todo-tree"
|
||||||
"ronnidc.nunjucks",
|
|
||||||
"sysoev.language-stylus"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+2
-1
@@ -9,7 +9,7 @@ const hydro = require('../dist/loader');
|
|||||||
fs.ensureDirSync(path.resolve(os.homedir(), '.hydro'));
|
fs.ensureDirSync(path.resolve(os.homedir(), '.hydro'));
|
||||||
const addonPath = path.resolve(os.homedir(), '.hydro', 'addon.json');
|
const addonPath = path.resolve(os.homedir(), '.hydro', 'addon.json');
|
||||||
if (!fs.existsSync(addonPath)) fs.writeFileSync(addonPath, '[]');
|
if (!fs.existsSync(addonPath)) fs.writeFileSync(addonPath, '[]');
|
||||||
const addons = JSON.parse(fs.readFileSync(addonPath).toString());
|
let addons = JSON.parse(fs.readFileSync(addonPath).toString());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const ui = argv.ui || '@hydrooj/ui-default';
|
const ui = argv.ui || '@hydrooj/ui-default';
|
||||||
@@ -33,6 +33,7 @@ if (argv._[0]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
addons = Array.from(new Set(addons));
|
||||||
console.log('Current Addons: ', addons);
|
console.log('Current Addons: ', addons);
|
||||||
fs.writeFileSync(addonPath, JSON.stringify(addons, null, 2));
|
fs.writeFileSync(addonPath, JSON.stringify(addons, null, 2));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { isSafeInteger, flatten } from 'lodash';
|
import { isSafeInteger, flatten } from 'lodash';
|
||||||
|
import yaml from 'js-yaml';
|
||||||
import { ObjectID } from 'mongodb';
|
import { ObjectID } from 'mongodb';
|
||||||
import paginate from '../lib/paginate';
|
import paginate from '../lib/paginate';
|
||||||
import {
|
import {
|
||||||
@@ -175,9 +176,12 @@ class ProblemDetailHandler extends ProblemHandler {
|
|||||||
if (this.pdoc.hidden && this.pdoc.owner !== this.user._id) {
|
if (this.pdoc.hidden && this.pdoc.owner !== this.user._id) {
|
||||||
this.checkPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN);
|
this.checkPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN);
|
||||||
}
|
}
|
||||||
|
const config: any = this.pdoc.config ? yaml.safeLoad(this.pdoc.config) : {};
|
||||||
this.udoc = await user.getById(domainId, this.pdoc.owner);
|
this.udoc = await user.getById(domainId, this.pdoc.owner);
|
||||||
this.response.body = {
|
this.response.body = {
|
||||||
pdoc: this.pdoc,
|
pdoc: this.pdoc,
|
||||||
|
time: config.time,
|
||||||
|
memory: config.memory,
|
||||||
udoc: this.udoc,
|
udoc: this.udoc,
|
||||||
title: this.pdoc.title,
|
title: this.pdoc.title,
|
||||||
path: [
|
path: [
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.9.4",
|
"version": "2.9.5",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
Reference in new issue
Block a user