core: add libzip

This commit is contained in:
undefined committed 2024-08-03 01:26:16 +08:00
1 parent f266542dec
commit b3f25c22ae
4 files changed
+16 -6

No files matched your search

+3
View File
@@ -33,3 +33,6 @@ if (!global.Hydro) {
global.addons = [];
}
global.app = new (require('./context').Context)();
process.on('exit', () => {
app.stop();
});
+3 -1
View File
@@ -1,3 +1,4 @@
import { ZipFS, ZipOpenFS } from '@yarnpkg/libzip';
import AdmZip from 'adm-zip';
import _ from 'lodash';
import { ObjectId as ObjectID } from 'mongodb';
@@ -9,8 +10,9 @@ export { WebSocket, WebSocketServer } from '@hydrooj/framework';
export * from './utils';
export * from './interface';
export * from './typeutils';
export * as LibZip from '@yarnpkg/libzip';
export {
Schema, AdmZip, superagent, _, ObjectID,
Schema, AdmZip, superagent, _, ObjectID, ZipFS, ZipOpenFS,
};
export const definePlugin = <T = never>(args: {
using?: keyof Context[];