update electron sample

This commit is contained in:
Caelan
2024-10-04 13:55:13 -06:00
parent 8054d32ef9
commit 48befe60a0
2 changed files with 4 additions and 5 deletions

View File

@@ -11217,7 +11217,7 @@
"node_modules/velopack": {
"version": "0.0.0",
"resolved": "file:../../src/lib-nodejs/velopack-0.0.0.tgz",
"integrity": "sha512-KVS2ralmScgT0iB+f5OsaMHiGSGi9Mv1Xyyf2x5k/zSPNqZ4M1UtMFMaHzPqmK3LrV3Lwmkuf9T7C5LEUsS08w==",
"integrity": "sha512-diY6roA+77XBpVqsMa1Jow9hScz2mwfY/Xy4deL6Et0MDchpr3oK5rrB2037Ok3Q75/l+hj9So1PX0NelwjMgQ==",
"license": "MIT",
"dependencies": {
"@neon-rs/load": "^0.1.73"

View File

@@ -1,5 +1,5 @@
import { app, BrowserWindow } from 'electron';
import { VelopackApp } from "velopack";
import { VelopackApp, setVelopackLogger } from "velopack";
import { initializeUpdates } from "./update"
// This allows TypeScript to pick up the magic constants that's auto-generated by Forge's Webpack
// plugin that tells the Electron app where to look for the Webpack-bundled app code (depending on
@@ -9,9 +9,8 @@ declare const MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY: string;
// VelopackApp should be the first thing to run in startup
// as it may need to quit / restart the application at certain points
VelopackApp.build()
.setLogger((lvl, msg) => console.log(`Velopack [${lvl}] ${msg}`))
.run();
setVelopackLogger((lvl, msg) => console.log(`Velopack [${lvl}] ${msg}`));
VelopackApp.build().run();
// Configure IPC listener for Velopack update messages
initializeUpdates();