From 0989c369a8f2ab083666dbc7842c03742cf639cb Mon Sep 17 00:00:00 2001 From: undefined Date: Fri, 25 Mar 2022 16:48:24 +0800 Subject: [PATCH] ui: remove misleading training template problemId --- build/utils.js | 14 +------------- packages/ui-default/package.json | 2 +- .../templates/partials/training_default.json | 2 +- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/build/utils.js b/build/utils.js index eff6561c..ab8f6cd0 100644 --- a/build/utils.js +++ b/build/utils.js @@ -14,18 +14,6 @@ function getWorkspaces() { }); } -function spawnSync(command, silent) { - if (!silent) console.log(`$ ${command}`); - const args = command.split(/\s+/); - const result = spawn.sync(args[0], [...args.slice(1), '--color'], { cwd, encoding: 'utf8' }); - if (result.status) { - throw new Error(result.stderr); - } else { - if (!silent) console.log(result.stdout); - return result.stdout.trim(); - } -} - function spawnAsync(command, path) { const args = command.split(/\s+/); const options = { stdio: 'inherit' }; @@ -38,5 +26,5 @@ function spawnAsync(command, path) { } module.exports = { - cwd, spawnSync, spawnAsync, getWorkspaces, + cwd, spawnAsync, getWorkspaces, }; diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index 1744dc37..dbe1c627 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/ui-default", - "version": "4.34.25", + "version": "4.34.26", "author": "undefined ", "license": "AGPL-3.0", "main": "hydro.js", diff --git a/packages/ui-default/templates/partials/training_default.json b/packages/ui-default/templates/partials/training_default.json index fe14351c..eb7d1f7f 100644 --- a/packages/ui-default/templates/partials/training_default.json +++ b/packages/ui-default/templates/partials/training_default.json @@ -3,7 +3,7 @@ "_id": 1, "title": "最初的最初 - A+B Problem", "requireNids": [], - "pids": [1, "P1001"] + "pids": [1] }, { "_id": 2,