rxdb-premium
Version:
RxDB Premium
1 lines • 614 B
JavaScript
const n=require("fs"),t=require("path"),e="https://premium.rxdb.info/scripts/installer.js";async function o(){if(console.log("# RxDB Premium running postinstall.js"),"function"!=typeof fetch)throw new Error("RxDB Premium: fetch function not found, RxDB requires Node.js version 18 or newer");let o;try{const n=await fetch(e);o=await n.text()}catch(n){throw console.error("RxDB Premium: Could not download installer from "+e),n}const r=t.join(__dirname,"installer.js");n.existsSync(r)&&await n.promises.unlink(r),await n.promises.writeFile(r,o,"utf-8"),console.log("# RxDB Premium running postinstall.js DONE")}o();