mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: seperate module build
This commit is contained in:
1 parent
90a9fa95f4
commit
c2c85581c4
8 files changed
+57
-36
No files matched your search
@@ -2,6 +2,18 @@
|
||||
require('@hydrooj/utils/lib/register');
|
||||
|
||||
const { default: hook } = require('require-resolve-hook');
|
||||
const { bypass } = hook(/^(hydrooj|@hydrooj\/utils|cordis|schemastery|lodash|js-yaml)/, (id) => bypass(() => require.resolve(id)));
|
||||
const { bypass } = hook(/^(hydrooj|@hydrooj\/utils|cordis|schemastery|lodash|js-yaml)/, (id) => {
|
||||
if (id.startsWith('hydrooj/src')) {
|
||||
console.log('module require via %s is deprecated.', id);
|
||||
if (process.env.DEV) {
|
||||
console.log(
|
||||
new Error().stack.split('\n')
|
||||
.filter((i) => !i.includes('node:internal') && i.startsWith(' '))
|
||||
.join('\n'),
|
||||
);
|
||||
}
|
||||
}
|
||||
return bypass(() => require.resolve(id));
|
||||
});
|
||||
|
||||
require('./commands');
|
||||
@@ -631,7 +631,7 @@ export interface Model {
|
||||
builtin: typeof import('./model/builtin'),
|
||||
contest: typeof import('./model/contest'),
|
||||
DiscussionModel: typeof import('./model/discussion'),
|
||||
document: typeof import('./model/document'),
|
||||
document: Omit<typeof import('./model/document'), 'apply'>,
|
||||
domain: typeof import('./model/domain').default,
|
||||
message: typeof import('./model/message').default,
|
||||
opcount: typeof import('./model/opcount'),
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { OpcountExceededError } from '../error';
|
||||
import * as bus from '../service/bus';
|
||||
import db from '../service/db';
|
||||
|
||||
const coll = db.collection('opcount');
|
||||
|
||||
@@ -42,6 +42,7 @@ export { default as paginate } from './lib/paginate';
|
||||
export * from './service/decorators';
|
||||
export { Handler, ConnectionHandler } from './service/server';
|
||||
export { UiContextBase } from './service/layers/base';
|
||||
export * as StorageService from './service/storage';
|
||||
export { EventMap } from './service/bus';
|
||||
export {
|
||||
db, Schema, yaml, fs, AdmZip, superagent,
|
||||
|
||||
Reference in new issue
Block a user