ci: fix config generation

pull/431/head
undefined 2 years ago
parent 6cea9eb51c
commit c6796a3a2b

@ -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": {

@ -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) => {

Loading…
Cancel
Save