mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 21:26:08 +01:00
add zip vfs
This commit is contained in:
4 files changed
+24
-9
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { assertSecret } from "@blitzkit/core";
|
||||
import { LocalVFS } from "./local";
|
||||
import { MixedVFS } from "./mixed";
|
||||
import { ZipVFS } from "./zip";
|
||||
|
||||
// zip reads straight from the remote archive; CLIENT_DIR stays first so SmartDLC patches override it
|
||||
export function createClientVFS() {
|
||||
const local = new LocalVFS(assertSecret(import.meta.env.CLIENT_DIR));
|
||||
|
||||
if (import.meta.env.CLIENT_PROVIDER === "zip") {
|
||||
return new MixedVFS([
|
||||
local,
|
||||
new ZipVFS(assertSecret(import.meta.env.CLIENT_SOURCE)),
|
||||
]);
|
||||
}
|
||||
|
||||
return local;
|
||||
}
|
||||
Reference in new issue
Block a user