chore: 部分小更改
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
class Debugger{
|
||||
static log(msg: any){
|
||||
if (process.env.DEBUG){
|
||||
console.log(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
7
backend/src/utils/logger.ts
Normal file
7
backend/src/utils/logger.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
const env = process.env.DEBUG;
|
||||
|
||||
export function debug(msg: string){
|
||||
if (env === "true"){
|
||||
console.info(msg);
|
||||
}
|
||||
}
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user