mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ci: fix config generation
This commit is contained in:
1 parent
6cea9eb51c
commit
c6796a3a2b
4 files changed
+7
-5
No files matched your search
+1
-1
@@ -88,10 +88,10 @@ const UIConfig = {
|
||||
};
|
||||
|
||||
for (const package of modules) {
|
||||
config.references.push({ path: package });
|
||||
const basedir = path.resolve(process.cwd(), package);
|
||||
const files = fs.readdirSync(basedir);
|
||||
if (!files.includes('src') && !files.filter((i) => i.endsWith('.ts')).length && package !== 'packages/utils') continue;
|
||||
config.references.push({ path: package });
|
||||
const expectedConfig = JSON.stringify((files.includes('src') ? configSrc : configFlat)(package));
|
||||
const configPath = path.resolve(basedir, 'tsconfig.json');
|
||||
const currentConfig = fs.existsSync(configPath) ? fs.readFileSync(configPath, 'utf-8') : '';
|
||||
|
||||
@@ -45,7 +45,10 @@ export * as validator from './lib/validator';
|
||||
export { default as rank } from './lib/rank';
|
||||
export { default as paginate } from './lib/paginate';
|
||||
export * from './service/decorators';
|
||||
export { Handler, ConnectionHandler, captureAllRoutes } from './service/server';
|
||||
export {
|
||||
Handler, ConnectionHandler, captureAllRoutes,
|
||||
httpServer, wsServer, router,
|
||||
} from './service/server';
|
||||
export { UiContextBase } from './service/layers/base';
|
||||
export * as StorageService from './service/storage';
|
||||
export { EventMap } from './service/bus';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "4.40.11",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
"main": "index.ts",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
"preferUnplugged": true,
|
||||
"scripts": {
|
||||
|
||||
+1
-2
@@ -2,7 +2,6 @@ import assert from 'assert';
|
||||
import autocannon from 'autocannon';
|
||||
import { writeFileSync } from 'fs-extra';
|
||||
import * as supertest from 'supertest';
|
||||
import * as bus from 'hydrooj/src/service/bus';
|
||||
|
||||
const Root = {
|
||||
username: 'root',
|
||||
@@ -17,7 +16,7 @@ describe('App', () => {
|
||||
let timeout;
|
||||
const resolve = () => setTimeout(() => {
|
||||
clearTimeout(timeout);
|
||||
agent = supertest.agent(require('hydrooj/src/service/server').httpServer);
|
||||
agent = supertest.agent(require('hydrooj').httpServer);
|
||||
done();
|
||||
}, 2000);
|
||||
process.send = ((send) => (data) => {
|
||||
|
||||
Reference in new issue
Block a user