mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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) {
|
for (const package of modules) {
|
||||||
config.references.push({ path: package });
|
|
||||||
const basedir = path.resolve(process.cwd(), package);
|
const basedir = path.resolve(process.cwd(), package);
|
||||||
const files = fs.readdirSync(basedir);
|
const files = fs.readdirSync(basedir);
|
||||||
if (!files.includes('src') && !files.filter((i) => i.endsWith('.ts')).length && package !== 'packages/utils') continue;
|
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 expectedConfig = JSON.stringify((files.includes('src') ? configSrc : configFlat)(package));
|
||||||
const configPath = path.resolve(basedir, 'tsconfig.json');
|
const configPath = path.resolve(basedir, 'tsconfig.json');
|
||||||
const currentConfig = fs.existsSync(configPath) ? fs.readFileSync(configPath, 'utf-8') : '';
|
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 rank } from './lib/rank';
|
||||||
export { default as paginate } from './lib/paginate';
|
export { default as paginate } from './lib/paginate';
|
||||||
export * from './service/decorators';
|
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 { UiContextBase } from './service/layers/base';
|
||||||
export * as StorageService from './service/storage';
|
export * as StorageService from './service/storage';
|
||||||
export { EventMap } from './service/bus';
|
export { EventMap } from './service/bus';
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"version": "4.40.11",
|
"version": "4.40.11",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "index.ts",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+1
-2
@@ -2,7 +2,6 @@ import assert from 'assert';
|
|||||||
import autocannon from 'autocannon';
|
import autocannon from 'autocannon';
|
||||||
import { writeFileSync } from 'fs-extra';
|
import { writeFileSync } from 'fs-extra';
|
||||||
import * as supertest from 'supertest';
|
import * as supertest from 'supertest';
|
||||||
import * as bus from 'hydrooj/src/service/bus';
|
|
||||||
|
|
||||||
const Root = {
|
const Root = {
|
||||||
username: 'root',
|
username: 'root',
|
||||||
@@ -17,7 +16,7 @@ describe('App', () => {
|
|||||||
let timeout;
|
let timeout;
|
||||||
const resolve = () => setTimeout(() => {
|
const resolve = () => setTimeout(() => {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
agent = supertest.agent(require('hydrooj/src/service/server').httpServer);
|
agent = supertest.agent(require('hydrooj').httpServer);
|
||||||
done();
|
done();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
process.send = ((send) => (data) => {
|
process.send = ((send) => (data) => {
|
||||||
|
|||||||
Reference in new issue
Block a user