feat:基本最终完成

This commit is contained in:
Tianpao
2025-07-03 01:19:27 +08:00
parent 38c0aeb516
commit fa83d5095f
11 changed files with 158 additions and 31 deletions

View File

@@ -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
})()