mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-20 19:51:09 +10:00
Fix 7z archives with spaces (#288)
* fix: ignore imported versions * fix: bump droplet for 7z fixes
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div v-if="!noWrapper" class="flex flex-col w-full min-h-screen bg-zinc-900">
|
||||
<UserHeader class="z-50" hydrate-on-idle />
|
||||
<LazyUserHeader class="z-50" hydrate-on-idle />
|
||||
<div class="grow flex">
|
||||
<NuxtPage />
|
||||
</div>
|
||||
<UserFooter class="z-50" hydrate-on-interaction />
|
||||
<LazyUserFooter class="z-50" hydrate-on-interaction />
|
||||
</div>
|
||||
<div v-else class="flex w-full min-h-screen bg-zinc-900">
|
||||
<NuxtPage />
|
||||
|
||||
@ -175,6 +175,9 @@ export default defineNuxtConfig({
|
||||
},
|
||||
|
||||
i18n: {
|
||||
bundle: {
|
||||
optimizeTranslationDirective: false,
|
||||
},
|
||||
defaultLocale: "en-us",
|
||||
strategy: "no_prefix",
|
||||
experimental: {
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@discordapp/twemoji": "^16.0.1",
|
||||
"@drop-oss/droplet": "3.2.0",
|
||||
"@drop-oss/droplet": "3.4.0",
|
||||
"@headlessui/vue": "^1.7.23",
|
||||
"@heroicons/vue": "^2.1.5",
|
||||
"@lobomfz/prismark": "0.0.3",
|
||||
|
||||
90
pnpm-lock.yaml
generated
90
pnpm-lock.yaml
generated
@ -15,8 +15,8 @@ importers:
|
||||
specifier: ^16.0.1
|
||||
version: 16.0.1
|
||||
'@drop-oss/droplet':
|
||||
specifier: 3.2.0
|
||||
version: 3.2.0
|
||||
specifier: 3.4.0
|
||||
version: 3.4.0
|
||||
'@headlessui/vue':
|
||||
specifier: ^1.7.23
|
||||
version: 1.7.23(vue@3.5.22(typescript@5.8.3))
|
||||
@ -408,67 +408,67 @@ packages:
|
||||
'@discordapp/twemoji@16.0.1':
|
||||
resolution: {integrity: sha512-figLiBWzjS5cyrAjLaGjM8AAaowO3qvK8rg5bA2dElB4qsaPMvBVlFDMO2d3x+nC1igt7kgWH4dvNmvvUHUF8w==}
|
||||
|
||||
'@drop-oss/droplet-darwin-arm64@3.2.0':
|
||||
resolution: {integrity: sha512-dH/vRFxuLjOzYBBvDG140wKcx4LmFxBJ5iTjZrWzV641wiRjx8B38niWXuqZ2ZADkCL4muOvgRGFJ4W1N/j6jQ==}
|
||||
'@drop-oss/droplet-darwin-arm64@3.4.0':
|
||||
resolution: {integrity: sha512-pwyiCSq0lMpr55J5xUys87c1Ih87WjCrxK1MbOUG2EjtwwdOx/KcB2AcmT4FWi7QaKOf+1QdNoBkOWow15uRTQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@drop-oss/droplet-darwin-universal@3.2.0':
|
||||
resolution: {integrity: sha512-k7Xhzs2mXrQcm3SLhLNDBkUaCWqtbQ6dyme1ubsG9PZEcvv25T//8CNVFEsHVZTKqj5nF41iSh4Wz1Qn6VxkVw==}
|
||||
'@drop-oss/droplet-darwin-universal@3.4.0':
|
||||
resolution: {integrity: sha512-OCSdsX1gV0108IoGWxQ0GmkhOHkPsdteHb/QGTYVQlu0niJTGy6BHYCR6RPyq0T+xgY10zTeZDis3UFC/aslhQ==}
|
||||
engines: {node: '>= 10'}
|
||||
os: [darwin]
|
||||
|
||||
'@drop-oss/droplet-darwin-x64@3.2.0':
|
||||
resolution: {integrity: sha512-GvRwQrtcC1Dq6YyXxBGSFj+WasnIa1dk9t2lCaR9OQdh3qp2did21o2poo1Sgdjg+mI2lUdgZ6w0yXJlL1vl+A==}
|
||||
'@drop-oss/droplet-darwin-x64@3.4.0':
|
||||
resolution: {integrity: sha512-AtlKKYtq3iikVi8cqywnrW5FZN90rlt4SzU9Eq/zhPCD+4qIlOOyfA8hX5Wj+qBoCexqWJfnwrkq3Ne+8t+f7A==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@drop-oss/droplet-linux-arm64-gnu@3.2.0':
|
||||
resolution: {integrity: sha512-ZqH0xTEeSeJF77vy8rZDxHEV8JMaN0khdg6ptpnbBfc56J5jt6wS3NlHK8M0ZVlDqqZnXMS1vUO0b6rfmQodKw==}
|
||||
'@drop-oss/droplet-linux-arm64-gnu@3.4.0':
|
||||
resolution: {integrity: sha512-oQMRTlzFW3TE/V7jWHFPYSA9UDSyqBJ1o9xWUg6ScJwkDy4vaGD9gdlndyuoQeD+ninM4AHYSrE94t8V7ptKFw==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@drop-oss/droplet-linux-arm64-musl@3.2.0':
|
||||
resolution: {integrity: sha512-TTw44PggYfp3RJkvNhXH89duuuvONEA8c8oRBCzCczRf3hDnbzCQLaB1UlnIlESsJZXXiFSDIBV2/0kkpB+Ukg==}
|
||||
'@drop-oss/droplet-linux-arm64-musl@3.4.0':
|
||||
resolution: {integrity: sha512-DmhTqoxvzggB451wdqGMROvvTGMcyPz3xWc9XT5O/ibJ2EYRYH6D15A0CBGxWjr1TmxMrXrRuU4K+q8lJfq62w==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@drop-oss/droplet-linux-riscv64-gnu@3.2.0':
|
||||
resolution: {integrity: sha512-Ee/PfkoG8pm/9C3LFXJleIi5N8V5cK+44p+iDaneAo6gj5k67zYzuga3mJVswTgd3fncG1cw+xPqBl4PUWc1pg==}
|
||||
'@drop-oss/droplet-linux-riscv64-gnu@3.4.0':
|
||||
resolution: {integrity: sha512-LbzT3z//Q03KJfLeRprjb7ICiAzBv+mNlrKKlZ1Zisjzgnqk7kx32sz5dStGDL+P+26yUt6inLZBhS56cWIyvA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
||||
'@drop-oss/droplet-linux-x64-gnu@3.2.0':
|
||||
resolution: {integrity: sha512-L2M/MEoe5Y74MTtzpEWHIvdyRSPLgM1WLzpb/xRNCWe8d6FcUFDgdMlbd6rDj5t4Q6JEzyMIHUciVRaYIv+ShA==}
|
||||
'@drop-oss/droplet-linux-x64-gnu@3.4.0':
|
||||
resolution: {integrity: sha512-U9BIyHxmtDIobyReuaXanYQ/TJOsRGQJ4WlXk+amZbMeAp8dyVawP0pmXbQO/hny/+VlxtAlObeCZ5T3nK+etQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@drop-oss/droplet-linux-x64-musl@3.2.0':
|
||||
resolution: {integrity: sha512-F/uQUAHWbhiiAtoyKHQHPgjG7jJd8pQX6sCgdf5ufCdwFLvHEdu9pO0qN+xpzaACceIKX4Vip0vUwQwEzYhAKA==}
|
||||
'@drop-oss/droplet-linux-x64-musl@3.4.0':
|
||||
resolution: {integrity: sha512-TQtLGSk6M2fu9K85rS02Yv3Etb5mk77tGIDLY8KAl/fLJOWRxuRfwtTnlIA5IuNnsO/3rOmwCOvpF6tVI010mA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@drop-oss/droplet-win32-arm64-msvc@3.2.0':
|
||||
resolution: {integrity: sha512-x7i1KKL8vQGcXbKIyH56LCEdQxLKNEk/KFjuD/YGrbBJ/+Q+fh46hLK+Sx4I/HzPHecd5g3xc2kVgO7+DgjhYA==}
|
||||
'@drop-oss/droplet-win32-arm64-msvc@3.4.0':
|
||||
resolution: {integrity: sha512-z0NTFVefyXgFeeH8NHdM54PFxPctcLDWiQ/UZzsTMhahXj+yQwsAiM2q41GSeBIEBkR9r1IEuqMRhgXeCfyBLg==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@drop-oss/droplet-win32-x64-msvc@3.2.0':
|
||||
resolution: {integrity: sha512-lC8a456IQ0ArzX40IlStolV4GIdl26xF9PikcuQ9r+n4VDqWSHb8A0Wwj87leU3QdoMu+Y2nlA1QHKgpVSEuoQ==}
|
||||
'@drop-oss/droplet-win32-x64-msvc@3.4.0':
|
||||
resolution: {integrity: sha512-NNbIchHnnwcAPtmwBAY3Y2glhFjndGg+FO0MjvajQIf5ts+b+ss5SSEjDDRw/KkPjlQAxFymRAhBbP7ObwdWQg==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@drop-oss/droplet@3.2.0':
|
||||
resolution: {integrity: sha512-+3zw3MPriMrj8HlKAq2VTlXEPOXN0homusjmQcBRzVx7GjtGvb5Y9YIHs16qfn8zdTEDi5twrtsUBQYkVjU2bQ==}
|
||||
'@drop-oss/droplet@3.4.0':
|
||||
resolution: {integrity: sha512-hGNoSBUg/tWxYESqHvV5AXBIcra9LXvkFg7WyCdRK9o1xhwTjAOmCaoivG1eSpjXEbWsFB69aI0sdvH/4nHzKg==}
|
||||
engines: {node: '>= 10'}
|
||||
|
||||
'@dxup/nuxt@0.2.2':
|
||||
@ -7110,48 +7110,48 @@ snapshots:
|
||||
jsonfile: 5.0.0
|
||||
universalify: 0.1.2
|
||||
|
||||
'@drop-oss/droplet-darwin-arm64@3.2.0':
|
||||
'@drop-oss/droplet-darwin-arm64@3.4.0':
|
||||
optional: true
|
||||
|
||||
'@drop-oss/droplet-darwin-universal@3.2.0':
|
||||
'@drop-oss/droplet-darwin-universal@3.4.0':
|
||||
optional: true
|
||||
|
||||
'@drop-oss/droplet-darwin-x64@3.2.0':
|
||||
'@drop-oss/droplet-darwin-x64@3.4.0':
|
||||
optional: true
|
||||
|
||||
'@drop-oss/droplet-linux-arm64-gnu@3.2.0':
|
||||
'@drop-oss/droplet-linux-arm64-gnu@3.4.0':
|
||||
optional: true
|
||||
|
||||
'@drop-oss/droplet-linux-arm64-musl@3.2.0':
|
||||
'@drop-oss/droplet-linux-arm64-musl@3.4.0':
|
||||
optional: true
|
||||
|
||||
'@drop-oss/droplet-linux-riscv64-gnu@3.2.0':
|
||||
'@drop-oss/droplet-linux-riscv64-gnu@3.4.0':
|
||||
optional: true
|
||||
|
||||
'@drop-oss/droplet-linux-x64-gnu@3.2.0':
|
||||
'@drop-oss/droplet-linux-x64-gnu@3.4.0':
|
||||
optional: true
|
||||
|
||||
'@drop-oss/droplet-linux-x64-musl@3.2.0':
|
||||
'@drop-oss/droplet-linux-x64-musl@3.4.0':
|
||||
optional: true
|
||||
|
||||
'@drop-oss/droplet-win32-arm64-msvc@3.2.0':
|
||||
'@drop-oss/droplet-win32-arm64-msvc@3.4.0':
|
||||
optional: true
|
||||
|
||||
'@drop-oss/droplet-win32-x64-msvc@3.2.0':
|
||||
'@drop-oss/droplet-win32-x64-msvc@3.4.0':
|
||||
optional: true
|
||||
|
||||
'@drop-oss/droplet@3.2.0':
|
||||
'@drop-oss/droplet@3.4.0':
|
||||
optionalDependencies:
|
||||
'@drop-oss/droplet-darwin-arm64': 3.2.0
|
||||
'@drop-oss/droplet-darwin-universal': 3.2.0
|
||||
'@drop-oss/droplet-darwin-x64': 3.2.0
|
||||
'@drop-oss/droplet-linux-arm64-gnu': 3.2.0
|
||||
'@drop-oss/droplet-linux-arm64-musl': 3.2.0
|
||||
'@drop-oss/droplet-linux-riscv64-gnu': 3.2.0
|
||||
'@drop-oss/droplet-linux-x64-gnu': 3.2.0
|
||||
'@drop-oss/droplet-linux-x64-musl': 3.2.0
|
||||
'@drop-oss/droplet-win32-arm64-msvc': 3.2.0
|
||||
'@drop-oss/droplet-win32-x64-msvc': 3.2.0
|
||||
'@drop-oss/droplet-darwin-arm64': 3.4.0
|
||||
'@drop-oss/droplet-darwin-universal': 3.4.0
|
||||
'@drop-oss/droplet-darwin-x64': 3.4.0
|
||||
'@drop-oss/droplet-linux-arm64-gnu': 3.4.0
|
||||
'@drop-oss/droplet-linux-arm64-musl': 3.4.0
|
||||
'@drop-oss/droplet-linux-riscv64-gnu': 3.4.0
|
||||
'@drop-oss/droplet-linux-x64-gnu': 3.4.0
|
||||
'@drop-oss/droplet-linux-x64-musl': 3.4.0
|
||||
'@drop-oss/droplet-win32-arm64-msvc': 3.4.0
|
||||
'@drop-oss/droplet-win32-x64-msvc': 3.4.0
|
||||
|
||||
'@dxup/nuxt@0.2.2(magicast@0.5.1)':
|
||||
dependencies:
|
||||
|
||||
@ -105,7 +105,10 @@ class LibraryManager {
|
||||
if (!game) return undefined;
|
||||
|
||||
try {
|
||||
const versions = await provider.listVersions(libraryPath);
|
||||
const versions = await provider.listVersions(
|
||||
libraryPath,
|
||||
game.versions.map((v) => v.versionName),
|
||||
);
|
||||
const unimportedVersions = versions.filter(
|
||||
(e) =>
|
||||
game.versions.findIndex((v) => v.versionName == e) == -1 &&
|
||||
|
||||
@ -24,7 +24,10 @@ export abstract class LibraryProvider<CFG> {
|
||||
* @param game folder name of the game to list versions for
|
||||
* @returns list of version folder names
|
||||
*/
|
||||
abstract listVersions(game: string): Promise<string[]>;
|
||||
abstract listVersions(
|
||||
game: string,
|
||||
existingPaths?: string[],
|
||||
): Promise<string[]>;
|
||||
|
||||
/**
|
||||
* @param game folder name of the game
|
||||
|
||||
@ -54,11 +54,15 @@ export class FilesystemProvider
|
||||
return folderDirs;
|
||||
}
|
||||
|
||||
async listVersions(game: string): Promise<string[]> {
|
||||
async listVersions(
|
||||
game: string,
|
||||
ignoredVersions?: string[],
|
||||
): Promise<string[]> {
|
||||
const gameDir = path.join(this.config.baseDir, game);
|
||||
if (!fs.existsSync(gameDir)) throw new GameNotFoundError();
|
||||
const versionDirs = fs.readdirSync(gameDir);
|
||||
const validVersionDirs = versionDirs.filter((e) => {
|
||||
if (ignoredVersions && ignoredVersions.includes(e)) return false;
|
||||
const fullDir = path.join(this.config.baseDir, game, e);
|
||||
return DROPLET_HANDLER.hasBackendForPath(fullDir);
|
||||
});
|
||||
@ -109,17 +113,12 @@ export class FilesystemProvider
|
||||
) {
|
||||
const filepath = path.join(this.config.baseDir, game, version);
|
||||
if (!fs.existsSync(filepath)) return undefined;
|
||||
let stream;
|
||||
while (!(stream instanceof ReadableStream)) {
|
||||
const v = DROPLET_HANDLER.readFile(
|
||||
filepath,
|
||||
filename,
|
||||
options?.start ? BigInt(options.start) : undefined,
|
||||
options?.end ? BigInt(options.end) : undefined,
|
||||
);
|
||||
if (!v) return undefined;
|
||||
stream = v.getStream() as ReadableStream<unknown>;
|
||||
}
|
||||
const stream = DROPLET_HANDLER.readFile(
|
||||
filepath,
|
||||
filename,
|
||||
options?.start ? BigInt(options.start) : undefined,
|
||||
options?.end ? BigInt(options.end) : undefined,
|
||||
);
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ export class FlatFilesystemProvider
|
||||
);
|
||||
if (!stream) return undefined;
|
||||
|
||||
return stream.getStream();
|
||||
return stream;
|
||||
}
|
||||
|
||||
fsStats() {
|
||||
|
||||
Reference in New Issue
Block a user