UNPKG

orange-orm

Version:

Object Relational Mapper

29 lines (28 loc) 1.17 kB
import { n as __toESM } from "./orange-orm.js"; import { h as u, s as ur, t as C } from "./chunk-VBDAOXYI-DoAeWiRV.js"; import { t as require_browser_external_fs } from "./browser-external_fs-BjtkIK-z.js"; import { t as require_browser_external_path } from "./browser-external_path-Cd67fXdO.js"; //#region ../../node_modules/@electric-sql/pglite/dist/fs/nodefs.js var import_browser_external_fs = /* @__PURE__ */ __toESM(require_browser_external_fs(), 1); var import_browser_external_path = /* @__PURE__ */ __toESM(require_browser_external_path(), 1); u(); var m = class extends ur { constructor(t) { super(t), this.rootDir = import_browser_external_path.resolve(t), import_browser_external_fs.existsSync(import_browser_external_path.join(this.rootDir)) || import_browser_external_fs.mkdirSync(this.rootDir); } async init(t, e) { return this.pg = t, { emscriptenOpts: { ...e, preRun: [...e.preRun || [], (r) => { let c = r.FS.filesystems.NODEFS; r.FS.mkdir(C), r.FS.mount(c, { root: this.rootDir }, C); }] } }; } async closeFs() { this.pg.Module.FS.quit(); } }; //#endregion export { m as NodeFS }; //# sourceMappingURL=nodefs-CesrTPF2.js.map