mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
bump prerelease
This commit is contained in:
15 files changed
+36
-40
No files matched your search
+6
-4
@@ -4,14 +4,14 @@ import { writeFileSync } from 'fs';
|
||||
import path from 'path';
|
||||
import ora from 'ora';
|
||||
import packageJson from 'package-json';
|
||||
import { gt } from 'semver';
|
||||
import { gt, prerelease } from 'semver';
|
||||
import { getWorkspaces, spawnAsync } from './utils';
|
||||
|
||||
const {
|
||||
CI, GITHUB_EVENT_NAME, GITHUB_REF,
|
||||
} = process.env;
|
||||
|
||||
const tag = GITHUB_REF === 'refs/heads/master' ? 'latest' : GITHUB_REF === 'refs/heads/develop' ? 'dev' : undefined;
|
||||
const tag = GITHUB_REF === 'refs/heads/master' ? 'latest' : GITHUB_REF === 'refs/heads/next' ? 'dev' : undefined;
|
||||
|
||||
if (CI && (!tag || GITHUB_EVENT_NAME !== 'push')) {
|
||||
console.log('publish skipped.');
|
||||
@@ -54,8 +54,10 @@ if (CI && (!tag || GITHUB_EVENT_NAME !== 'push')) {
|
||||
console.log(`publishing ${name}@${bumpMap[name]} ...`);
|
||||
if (tag === 'dev') {
|
||||
const pkg = require(`${name}/package.json`);
|
||||
pkg.version += '-dev';
|
||||
writeFileSync(path.resolve(`${name}/package.json`), JSON.stringify(pkg));
|
||||
if (!prerelease(pkg.version)) {
|
||||
pkg.version += '-dev';
|
||||
writeFileSync(path.resolve(`${name}/package.json`), JSON.stringify(pkg));
|
||||
}
|
||||
}
|
||||
await spawnAsync(
|
||||
`yarn npm publish --access public --tag ${tag}`,
|
||||
|
||||
@@ -82,6 +82,13 @@ async function run({ domainId }, report) {
|
||||
}
|
||||
|
||||
export const apply = (ctx: Context) => {
|
||||
ctx.setting.SystemSetting(Schema.object({
|
||||
'elastic-search': Schema.object({
|
||||
url: Schema.string().role('url').default('http://127.0.0.1:9200'),
|
||||
indexSize: Schema.number().role('indexSize').default(10000).min(0).step(1),
|
||||
}),
|
||||
}));
|
||||
|
||||
ctx.on('problem/add', async (doc, docId) => {
|
||||
await client.index({
|
||||
index: 'problem',
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
{
|
||||
"name": "@hydrooj/elastic-search",
|
||||
"version": "1.1.8",
|
||||
"version": "1.2.0-alpha.0",
|
||||
"main": "index.ts",
|
||||
"repository": "https://github.com/hydro-dev/Hydro",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@elastic/elasticsearch": "^8.17.1"
|
||||
},
|
||||
"engines": {
|
||||
"hydrooj": ">=5.0.0-alpha.0"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
url:
|
||||
value: http://127.0.0.1:9200
|
||||
indexSize:
|
||||
value: 10000
|
||||
@@ -36,6 +36,6 @@ export default class GeoIPService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
export async function apply(ctx: Context) {
|
||||
ctx.set('geoip', new GeoIPService(ctx));
|
||||
export function apply(ctx: Context) {
|
||||
ctx.plugin(GeoIPService);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "3.4.4",
|
||||
"version": "3.5.0-alpha.0",
|
||||
"main": "./src/index.ts",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "4.19.1",
|
||||
"version": "5.0.0-alpha.0",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/plugin-api",
|
||||
"module": "src/plugin-api",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/migrate",
|
||||
"version": "0.4.3",
|
||||
"version": "0.4.4-alpha.0",
|
||||
"main": "index.ts",
|
||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/onsite-toolkit",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.5-alpha.0",
|
||||
"dependencies": {
|
||||
"@react-spring/web": "^9.7.5",
|
||||
"react-use": "^17.6.0"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { hostname } from 'os';
|
||||
import { AggregatorRegistry, Metric } from 'prom-client';
|
||||
import {
|
||||
Context, Handler, superagent, SystemModel,
|
||||
Context, Handler, Schema, superagent, SystemModel,
|
||||
} from 'hydrooj';
|
||||
import { createRegistry } from './metrics';
|
||||
|
||||
@@ -43,6 +43,14 @@ class MetricsHandler extends Handler {
|
||||
}
|
||||
|
||||
export function apply(ctx: Context) {
|
||||
ctx.setting.SystemSetting(Schema.object({
|
||||
'prom-client': Schema.object({
|
||||
name: Schema.string().description('basic auth username while requesting metrics').default('admin'),
|
||||
password: Schema.string().role('password').description('basic auth password while requesting metrics').default('admin'),
|
||||
gateway: Schema.string().role('gateway').description('Leave blank to disable push gateway').default(''),
|
||||
collect_rate: Schema.number().role('collect_rate').default(1).description('Collect rate'),
|
||||
}),
|
||||
}));
|
||||
if (process.env.HYDRO_CLI) return;
|
||||
const registry = createRegistry(ctx);
|
||||
ctx.on('metrics', (id, metrics) => { instances[id] = metrics; });
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/prom-client",
|
||||
"version": "0.1.10",
|
||||
"version": "0.2.0-alpha.0",
|
||||
"main": "index.ts",
|
||||
"dependencies": {
|
||||
"prom-client": "^15.1.3"
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
name:
|
||||
type: text
|
||||
name: Auth Username
|
||||
desc: basic auth username while requesting metrics
|
||||
default: admin
|
||||
password:
|
||||
type: password
|
||||
name: Auth Password
|
||||
desc: basic auth password while requesting metrics
|
||||
default: admin
|
||||
collect_rate:
|
||||
type: number
|
||||
name: Collect Rate
|
||||
desc: The collect rate scale (default:1)
|
||||
default: 1
|
||||
gateway:
|
||||
type: text
|
||||
name: Push gateway endpoint
|
||||
desc: Leave blank to disable push gateway
|
||||
default: ""
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/sonic",
|
||||
"version": "1.3.3",
|
||||
"version": "1.4.0-alpha.0",
|
||||
"description": "Sonic search service",
|
||||
"main": "index.ts",
|
||||
"preferUnplugged": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.57.0",
|
||||
"version": "4.58.0-alpha.0",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/utils",
|
||||
"version": "1.4.33",
|
||||
"version": "1.4.34-alpha.0",
|
||||
"description": "hydrooj utils",
|
||||
"main": "lib/utils.ts",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
Reference in new issue
Block a user