Skip to content

Commit

Permalink
expose some internal utils, just because I can.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mazuh committed Feb 5, 2024
1 parent 08cc6a9 commit 4e2b8f2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/services/origin-private-file-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,14 @@ export function isPersistenceSupported(): boolean {
}

export const MAIN_OPFS_DIRECTORY = "postmaiden.com";

if (["production", "development"].includes(process.env.NODE_ENV || "?")) {
// expose internals, mostly just for fun.

// eslint-disable-next-line @typescript-eslint/no-explicit-any
(window as any).isPersistenceSupported = isPersistenceSupported;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(window as any).makeOpfsMainDirAdapter = makeOpfsMainDirAdapter;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(window as any).makeOpfsFileAdapter = makeOpfsFileAdapter;
}

0 comments on commit 4e2b8f2

Please sign in to comment.