mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
修复hydrojudge模块加载异常的问题
This commit is contained in:
1 parent
a8bdfa8f30
commit
a01383c1c1
5 files changed
+10
-5
No files matched your search
@@ -18,6 +18,7 @@ build/*.js
|
||||
yarn.lock
|
||||
|
||||
packages/**/*.js
|
||||
!packages/hydrojudge/service.js
|
||||
!**/bin/*.js
|
||||
packages/**/*.js.map
|
||||
packages/**/*.d.ts
|
||||
|
||||
+5
-2
@@ -4,6 +4,7 @@
|
||||
/* eslint-disable import/no-dynamic-require */
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { spawnSync } from 'child_process';
|
||||
import { gt } from 'semver';
|
||||
import latest from 'latest-version';
|
||||
import ora from 'ora';
|
||||
@@ -39,11 +40,13 @@ if (CI && (GITHUB_REF !== 'refs/heads/master' || GITHUB_EVENT_NAME !== 'push'))
|
||||
const version = await latest(meta.name);
|
||||
if (gt(meta.version, version)) {
|
||||
const prepublish = path.resolve(process.cwd(), 'packages', name, 'prepublish.sh');
|
||||
if (fs.existsSync(prepublish)) await spawnAsync(prepublish);
|
||||
if (fs.existsSync(prepublish)) spawnSync(prepublish);
|
||||
bumpMap[name] = meta.version;
|
||||
}
|
||||
}
|
||||
} catch { /* pass */ }
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
spinner.text = `Loading workspaces (${++progress}/${folders.length})`;
|
||||
}));
|
||||
spinner.succeed();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/geoip",
|
||||
"version": "1.1.8",
|
||||
"version": "1.1.9",
|
||||
"main": "package.json",
|
||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||
"author": "undefined <masnn0@outlook.com>",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"version": "2.0.6",
|
||||
"main": "dist/service.js",
|
||||
"version": "2.0.7",
|
||||
"main": "package.json",
|
||||
"author": "masnn",
|
||||
"os": [
|
||||
"linux"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = require('dist/service.js');
|
||||
Reference in new issue
Block a user