mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: add libzip
This commit is contained in:
4 files changed
+16
-6
No files matched your search
@@ -384,6 +384,10 @@ ${c.response.status} ${endTime - startTime}ms ${c.response.length}`);
|
||||
this.ctx.on('dispose', () => {
|
||||
fs.emptyDirSync(uploadDir);
|
||||
});
|
||||
// if killed by ctrl-c, on('dispose') will not be called
|
||||
process.on('exit', () => {
|
||||
fs.emptyDirSync(uploadDir);
|
||||
});
|
||||
} else {
|
||||
this.server.use(Body({
|
||||
multipart: true,
|
||||
|
||||
@@ -12,15 +12,16 @@
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "3.616.0",
|
||||
"@aws-sdk/lib-storage": "3.616.0",
|
||||
"@aws-sdk/s3-presigned-post": "3.616.0",
|
||||
"@aws-sdk/s3-request-presigner": "3.616.0",
|
||||
"@aws-sdk/client-s3": "3.622.0",
|
||||
"@aws-sdk/lib-storage": "3.622.0",
|
||||
"@aws-sdk/s3-presigned-post": "3.622.0",
|
||||
"@aws-sdk/s3-request-presigner": "3.622.0",
|
||||
"@graphql-tools/schema": "^10.0.4",
|
||||
"@hydrooj/framework": "workspace:^",
|
||||
"@hydrooj/utils": "workspace:^",
|
||||
"@simplewebauthn/server": "9.0.3",
|
||||
"@undefined-moe/require-resolve-hook": "^1.1.0",
|
||||
"@yarnpkg/libzip": "^3.1.0",
|
||||
"adm-zip": "0.5.14",
|
||||
"cac": "^6.7.14",
|
||||
"cordis": "3.16.0",
|
||||
@@ -64,7 +65,7 @@
|
||||
"@types/notp": "^2.0.5",
|
||||
"@types/saslprep": "^1.0.3",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/superagent": "^8.1.7",
|
||||
"@types/superagent": "^8.1.8",
|
||||
"chokidar": "^3.6.0",
|
||||
"moment": "^2.30.1"
|
||||
}
|
||||
|
||||
@@ -33,3 +33,6 @@ if (!global.Hydro) {
|
||||
global.addons = [];
|
||||
}
|
||||
global.app = new (require('./context').Context)();
|
||||
process.on('exit', () => {
|
||||
app.stop();
|
||||
});
|
||||
@@ -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[];
|
||||
|
||||
Reference in new issue
Block a user