feat:基本最终完成
This commit is contained in:
@@ -3,7 +3,9 @@ import pRetry from "p-retry";
|
||||
import fse from "fs-extra"
|
||||
import yauzl from "yauzl";
|
||||
import got from "got";
|
||||
import env from "dotenv"
|
||||
import { MultiBar } from "cli-progress";
|
||||
import {URL, fileURLToPath } from "node:url";
|
||||
import { LOGGER } from "./logger.js";
|
||||
|
||||
export async function readzipentry(zipfile: yauzl.ZipFile, entry: yauzl.Entry):Promise<string|Buffer> {
|
||||
@@ -119,4 +121,19 @@ export async function xfastdownload(
|
||||
concurrency: concurrency,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export const usemirror = (()=>{
|
||||
env.config()
|
||||
const mirror = process.env.MIRROR
|
||||
if(mirror){
|
||||
return false
|
||||
}else{
|
||||
return true
|
||||
}
|
||||
})()
|
||||
|
||||
export const isDevelopment = (()=>{
|
||||
env.config()
|
||||
return process.env.DEVELOPMENT
|
||||
})()
|
||||
Reference in New Issue
Block a user