chore: 部分小更改

This commit is contained in:
Tianpao
2025-12-27 12:14:56 +08:00
parent a0a600eef7
commit 6c3fbf0ae8
10 changed files with 76 additions and 51 deletions

View File

@@ -3,8 +3,6 @@ import crypto from "node:crypto"
import { yauzl_promise } from "./yauzl.promise.js"
import got from "got"
import { Utils } from "./utils.js"
import pa from "node:path"
import WebSocket from "ws"
import config from "./config.js"
interface IMixins{
name: string

View File

@@ -1,7 +0,0 @@
class Debugger{
static log(msg: any){
if (process.env.DEBUG){
console.log(msg)
}
}
}

View File

@@ -0,0 +1,7 @@
const env = process.env.DEBUG;
export function debug(msg: string){
if (env === "true"){
console.info(msg);
}
}

View File

@@ -4,7 +4,6 @@ import Stream from "node:stream"
export interface IentryP extends yauzl.Entry {
openReadStream: Promise<Stream.Readable>;
ReadEntry: Promise<Buffer>;
ReadEntrySync: Buffer;
}
export async function yauzl_promise(buffer: Buffer): Promise<IentryP[]>{
@@ -29,7 +28,6 @@ export async function yauzl_promise(buffer: Buffer): Promise<IentryP[]>{
isCompressed: entry.isCompressed,
openReadStream: _openReadStream(zip,entry),
ReadEntry: _ReadEntry(zip,entry),
ReadEntrySync: (await _ReadEntry(zip,entry))
}
entries.push(_entry)
if (zip.entryCount === entries.length){