Skip to content

Commit

Permalink
Update ZenFS (closes #196)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotNite committed Jan 22, 2025
1 parent e33b1c8 commit ab03b63
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 38 deletions.
4 changes: 2 additions & 2 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@moonlight-mod/core": "workspace:*",
"@moonlight-mod/types": "workspace:*",
"@moonlight-mod/web-preload": "workspace:*",
"@zenfs/core": "^1.0.2",
"@zenfs/dom": "^0.2.16"
"@zenfs/core": "^1.8.8",
"@zenfs/dom": "^1.1.3"
}
}
14 changes: 4 additions & 10 deletions packages/browser/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { loadExtensions } from "@moonlight-mod/core/extension/loader";
import { MoonlightBranch, MoonlightNode } from "@moonlight-mod/types";
import { getConfig, getConfigOption, getManifest, setConfigOption } from "@moonlight-mod/core/util/config";
import { IndexedDB } from "@zenfs/dom";
import { configure } from "@zenfs/core";
import { configureSingle } from "@zenfs/core";
import * as fs from "@zenfs/core/promises";

function getParts(path: string) {
Expand All @@ -18,15 +18,9 @@ window._moonlightBrowserInit = async () => {
delete window._moonlightBrowserInit;

// Set up a virtual filesystem with IndexedDB
await configure({
mounts: {
"/": {
backend: IndexedDB,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore tsc tweaking
storeName: "moonlight-fs"
}
}
await configureSingle({
backend: IndexedDB,
storeName: "moonlight-fs"
});

window.moonlightNodeSandboxed = {
Expand Down
59 changes: 33 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ab03b63

Please sign in to comment.