diff --git a/packages/fps-importer/handler.ts b/packages/fps-importer/handler.ts index 6eb24c07..f9218dd5 100644 --- a/packages/fps-importer/handler.ts +++ b/packages/fps-importer/handler.ts @@ -4,13 +4,13 @@ import xml2js from 'xml2js'; import fs from 'fs-extra'; import { filter } from 'lodash'; import decodeHTML from 'decode-html'; -import type { ProblemConfig } from 'hydrooj'; import { Route, Handler } from 'hydrooj/dist/service/server'; import { buildContent } from 'hydrooj/dist/lib/content'; import { ProblemAdd } from 'hydrooj/dist/lib/ui'; import solution from 'hydrooj/dist/model/solution'; import { PERM } from 'hydrooj/dist/model/builtin'; import { FileTooLargeError, ValidationError } from 'hydrooj/dist/error'; +import type { ProblemConfig } from 'hydrooj'; class FpsProblemImportHandler extends Handler { async get() { diff --git a/packages/hydrooj/src/interface.ts b/packages/hydrooj/src/interface.ts index 1f9bd4d0..01a4c692 100644 --- a/packages/hydrooj/src/interface.ts +++ b/packages/hydrooj/src/interface.ts @@ -1,9 +1,9 @@ +import { ItemBucketMetadata } from 'minio'; import type { Readable, Writable } from 'stream'; import type { Cursor, ObjectID } from 'mongodb'; import type fs from 'fs'; import type { Dictionary, NumericDictionary } from 'lodash'; import type * as Koa from 'koa'; -import { ItemBucketMetadata } from 'minio'; import type { ProblemDoc } from './model/problem'; type document = typeof import('./model/document'); diff --git a/packages/hydrooj/src/model/problem.ts b/packages/hydrooj/src/model/problem.ts index d32c3d08..d629708d 100644 --- a/packages/hydrooj/src/model/problem.ts +++ b/packages/hydrooj/src/model/problem.ts @@ -1,7 +1,7 @@ -import type { Readable } from 'stream'; import { ObjectID, FilterQuery } from 'mongodb'; import { Dictionary, escapeRegExp, pick } from 'lodash'; import { streamToBuffer } from '@hydrooj/utils/lib/utils'; +import type { Readable } from 'stream'; import * as document from './document'; import { STATUS } from './builtin'; import storage from './storage'; diff --git a/packages/hydrooj/src/model/storage.ts b/packages/hydrooj/src/model/storage.ts index 54de154d..9e31d626 100644 --- a/packages/hydrooj/src/model/storage.ts +++ b/packages/hydrooj/src/model/storage.ts @@ -1,7 +1,7 @@ -import type { Readable } from 'stream'; import { escapeRegExp } from 'lodash'; import { ItemBucketMetadata } from 'minio'; import moment from 'moment'; +import type { Readable } from 'stream'; import storage from '../service/storage'; import * as bus from '../service/bus'; import db from '../service/db'; diff --git a/packages/hydrooj/src/service/bus.ts b/packages/hydrooj/src/service/bus.ts index 533cd09b..718cf44b 100644 --- a/packages/hydrooj/src/service/bus.ts +++ b/packages/hydrooj/src/service/bus.ts @@ -1,8 +1,8 @@ /* eslint-disable no-await-in-loop */ import cluster from 'cluster'; -import type { Db, FilterQuery, OnlyFieldsOfType } from 'mongodb'; import serialize from 'serialize-javascript'; import { argv } from 'yargs'; +import type { Db, FilterQuery, OnlyFieldsOfType } from 'mongodb'; import type { Handler } from './server'; import { Logger } from '../logger'; import type { diff --git a/packages/hydrooj/src/service/server.ts b/packages/hydrooj/src/service/server.ts index 552a1bfb..c65d666d 100644 --- a/packages/hydrooj/src/service/server.ts +++ b/packages/hydrooj/src/service/server.ts @@ -15,9 +15,9 @@ import Router from 'koa-router'; import proxy from 'koa-proxies'; import cache from 'koa-static-cache'; import sockjs from 'sockjs'; -import type { SetOption } from 'cookies'; import { argv } from 'yargs'; import { createHash } from 'crypto'; +import type { SetOption } from 'cookies'; import * as bus from './bus'; import { errorMessage } from '../utils'; import { User, DomainDoc } from '../interface'; diff --git a/packages/import-qduoj/handler.ts b/packages/import-qduoj/handler.ts index 4049cedc..5aa6e926 100644 --- a/packages/import-qduoj/handler.ts +++ b/packages/import-qduoj/handler.ts @@ -4,12 +4,12 @@ import os from 'os'; import fs from 'fs-extra'; import AdmZip from 'adm-zip'; import yaml from 'js-yaml'; -import type { ContentNode, ProblemConfig } from 'hydrooj'; import { Route, Handler } from 'hydrooj/dist/service/server'; import { BadRequestError, ValidationError } from 'hydrooj/dist/error'; import { ProblemAdd } from 'hydrooj/dist/lib/ui'; import problem from 'hydrooj/dist/model/problem'; import { PERM } from 'hydrooj/dist/model/builtin'; +import type { ContentNode, ProblemConfig } from 'hydrooj'; fs.ensureDirSync('/tmp/hydro/import-qduoj');