Updates for packaging.
This commit is contained in:
@@ -13,6 +13,7 @@ asarUnpack:
|
||||
- resources/**
|
||||
win:
|
||||
executableName: bodyshop-desktop
|
||||
|
||||
nsis:
|
||||
artifactName: ${name}-${version}-setup.${ext}
|
||||
shortcutName: ${productName}
|
||||
@@ -26,7 +27,7 @@ mac:
|
||||
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
|
||||
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
|
||||
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
|
||||
notarize: false
|
||||
|
||||
dmg:
|
||||
artifactName: ${name}-${version}.${ext}
|
||||
linux:
|
||||
@@ -41,7 +42,7 @@ appImage:
|
||||
npmRebuild: false
|
||||
publish:
|
||||
provider: s3
|
||||
bucket: bodyshop-desktop-updater
|
||||
bucket: imex-partner
|
||||
region: ca-central-1
|
||||
electronDownload:
|
||||
mirror: https://npmmirror.com/mirrors/electron/
|
||||
|
||||
@@ -135,6 +135,7 @@ async function ImportJob(filepath: string): Promise<void> {
|
||||
delete jobObject.clmt_ph2;
|
||||
delete jobObject.clmt_ea;
|
||||
|
||||
if (import.meta.env.DEV) {
|
||||
// Save jobObject to a timestamped JSON file
|
||||
const timestamp = new Date()
|
||||
.toISOString()
|
||||
@@ -151,10 +152,7 @@ async function ImportJob(filepath: string): Promise<void> {
|
||||
const filePath = path.join(logsDir, fileName);
|
||||
fs.writeFileSync(filePath, JSON.stringify(jobObject, null, 2), "utf8");
|
||||
log.info(`Job data saved to: ${filePath}`);
|
||||
|
||||
log.debug("Job Object", {
|
||||
jobObject,
|
||||
});
|
||||
}
|
||||
|
||||
const newAvailableJob: AvailableJobSchema = {
|
||||
uploaded_by: store.get("user.email"),
|
||||
@@ -183,7 +181,7 @@ async function ImportJob(filepath: string): Promise<void> {
|
||||
newAvailableJob.est_data.vehicleid = existingVehicleRecord.vehicles[0].id;
|
||||
}
|
||||
|
||||
console.log(newAvailableJob);
|
||||
console.log("Available Job record to upload;", newAvailableJob);
|
||||
|
||||
const existingJobRecord: QueryJobByClmNoResult = await client.request(
|
||||
QUERY_JOB_BY_CLM_NO_TYPED,
|
||||
|
||||
@@ -6,6 +6,7 @@ import icon from "../../resources/icon.png?asset";
|
||||
import ErrorTypeCheck from "../util/errorTypeCheck";
|
||||
import client from "./graphql/graphql-client";
|
||||
import store from "./store/store";
|
||||
import { autoUpdater } from "electron-updater";
|
||||
|
||||
log.initialize();
|
||||
const isMac = process.platform === "darwin";
|
||||
@@ -247,6 +248,11 @@ app.whenReady().then(async () => {
|
||||
});
|
||||
}
|
||||
|
||||
//Check for app updates.
|
||||
|
||||
autoUpdater.logger = log;
|
||||
autoUpdater.checkForUpdatesAndNotify();
|
||||
|
||||
createWindow();
|
||||
|
||||
app.on("activate", function () {
|
||||
|
||||
Reference in New Issue
Block a user