First upload version 0.0.1

This commit is contained in:
Neyra
2026-02-05 15:27:49 +08:00
commit 8e9b7201ed
4182 changed files with 593136 additions and 0 deletions

27
node_modules/ipull/dist/cli/utils/find-download-dir.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
import path from "path";
import fs from "fs-extra";
import { AppDB } from "../../settings/settings.js";
const DEFAULT_DOWNLOAD_DIR = process.cwd();
export default async function findDownloadDir(fileName) {
const downloadLocation = AppDB.data[path.extname(fileName || "")];
const defaultLocation = AppDB.data["default"];
return downloadLocation || defaultLocation || DEFAULT_DOWNLOAD_DIR;
}
export function findFileName(url) {
try {
return path.basename(new URL(url).pathname);
}
catch {
return path.basename(url);
}
}
export async function downloadToDirectory(path) {
try {
const stats = await fs.lstat(path);
return stats.isDirectory();
}
catch {
return false;
}
}
//# sourceMappingURL=find-download-dir.js.map