'init'
This commit is contained in:
10
lib/main/boot/updater.ts
Normal file
10
lib/main/boot/updater.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import fs from 'fs/promises'
|
||||
import JSZip from "jszip";
|
||||
import { compileBundleFile } from './compiler';
|
||||
|
||||
export async function installServiceUpdate(pathToUpdate : string) {
|
||||
let data = await fs.readFile(pathToUpdate);
|
||||
let zip = await JSZip.loadAsync(data);
|
||||
await compileBundleFile(zip);
|
||||
await fs.unlink(pathToUpdate);
|
||||
}
|
||||
Reference in New Issue
Block a user