From 59a8dc879c1133e77a15e5f76ef168f4a382d3eb Mon Sep 17 00:00:00 2001 From: Nishchit14 Date: Mon, 4 Mar 2024 16:52:03 +0530 Subject: [PATCH 1/2] feat: relainch fn implemented --- .../firecamp-electron/src/updater/dialogs.ts | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/packages/firecamp-electron/src/updater/dialogs.ts b/packages/firecamp-electron/src/updater/dialogs.ts index 668b66f9..3373c68a 100644 --- a/packages/firecamp-electron/src/updater/dialogs.ts +++ b/packages/firecamp-electron/src/updater/dialogs.ts @@ -2,17 +2,21 @@ import { app, dialog } from 'electron'; import { UpdateInfo } from 'electron-updater'; const showUpdateDownloadedWinDialog = (win: any) => { - dialog.showMessageBoxSync(win, { + const index = dialog.showMessageBoxSync(win, { type: 'question', title: '👏️ Installed New Version', message: 'The new version is installed. You may now restart the app.', detail: 'Please ensure you save any open, unsaved work before proceeding.', buttons: ['Cancel', 'Restart'], }); + if (index == 1) { + app.relaunch(); + app.exit(); + } }; const showUpdateDownloadedMacDialog = (win: any) => { - dialog.showMessageBoxSync(win, { + const index = dialog.showMessageBoxSync(win, { type: 'question', title: '👏️ Installed New Version', message: 'The new version is installed. You may now restart the app.', @@ -20,24 +24,36 @@ const showUpdateDownloadedMacDialog = (win: any) => { buttons: ['Cancel', 'Relaunch'], noLink: true, }); + if (index == 1) { + app.relaunch(); + app.exit(); + } }; const showUpdateAvailable = (win: any) => { - dialog.showMessageBoxSync(win, { + const index = dialog.showMessageBoxSync(win, { type: 'info', title: 'Update Found', message: 'Found updates, do you want to update now?', buttons: ['Sure', 'No'], }); + if (index == 1) { + app.relaunch(); + app.exit(); + } }; const showNoUpdateAvailable = (win: any, info: UpdateInfo) => { - dialog.showMessageBoxSync(win, { + const index = dialog.showMessageBoxSync(win, { type: 'info', title: 'No Updates Available', message: `No updates available. \n\n You're using the latest version Firecamp v${info.version}.`, buttons: ['Ok'], }); + if (index == 1) { + app.relaunch(); + app.exit(); + } }; export { From 6b85b995bdf75f1f8987f6fa54ca9e66ee1f2ebc Mon Sep 17 00:00:00 2001 From: Nishchit14 Date: Mon, 4 Mar 2024 18:49:12 +0530 Subject: [PATCH 2/2] feat: v3.3.0-beta.3 released --- packages/firecamp-electron/package.json | 4 ++-- .../firecamp-socket-io-executor/package.json | 1 + playgrounds/firecamp-ws-executor/package.json | 1 + pnpm-lock.yaml | 22 ++++++++++++++----- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/packages/firecamp-electron/package.json b/packages/firecamp-electron/package.json index 54a02530..5114077b 100644 --- a/packages/firecamp-electron/package.json +++ b/packages/firecamp-electron/package.json @@ -1,7 +1,7 @@ { "name": "@firecamp/electron", "productName": "Firecamp", - "version": "3.3.0-beta.2", + "version": "3.3.0-beta.3", "description": "The Firecamp Desktop Application", "main": "build/main.js", "private": true, @@ -34,7 +34,7 @@ }, "devDependencies": { "@types/node": "^20.8.9", - "electron": "^27.1.2", + "electron": "^29.1.0", "electron-builder": "^24.13.3" }, "build": { diff --git a/playgrounds/firecamp-socket-io-executor/package.json b/playgrounds/firecamp-socket-io-executor/package.json index 9e9bc1d1..bd466d60 100644 --- a/playgrounds/firecamp-socket-io-executor/package.json +++ b/playgrounds/firecamp-socket-io-executor/package.json @@ -32,6 +32,7 @@ }, "dependencies": { "@firecamp/types": "^0.2.2", + "@firecamp/url": "0.0.20", "@firecamp/utils": "^0.0.24", "comment-json": "^4.1.1", "mitt": "3.0.0", diff --git a/playgrounds/firecamp-ws-executor/package.json b/playgrounds/firecamp-ws-executor/package.json index fc9a8cc9..09059a15 100644 --- a/playgrounds/firecamp-ws-executor/package.json +++ b/playgrounds/firecamp-ws-executor/package.json @@ -35,6 +35,7 @@ }, "dependencies": { "@firecamp/types": "^0.2.2", + "@firecamp/url": "0.0.20", "@firecamp/utils": "^0.0.24", "comment-json": "^4.1.1", "mitt": "^3.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3199c331..179e7462 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -679,8 +679,8 @@ importers: specifier: ^20.8.9 version: 20.8.9 electron: - specifier: ^27.1.2 - version: 27.1.2 + specifier: ^29.1.0 + version: 29.1.0 electron-builder: specifier: ^24.13.3 version: 24.13.3(electron-builder-squirrel-windows@24.13.3) @@ -1809,6 +1809,9 @@ importers: '@firecamp/types': specifier: ^0.2.2 version: 0.2.2 + '@firecamp/url': + specifier: 0.0.20 + version: 0.0.20 '@firecamp/utils': specifier: ^0.0.24 version: 0.0.24 @@ -2006,6 +2009,9 @@ importers: '@firecamp/types': specifier: ^0.2.2 version: 0.2.2 + '@firecamp/url': + specifier: 0.0.20 + version: 0.0.20 '@firecamp/utils': specifier: ^0.0.24 version: 0.0.24 @@ -9675,6 +9681,12 @@ packages: resolution: {integrity: sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==} dev: true + /@types/node@20.11.24: + resolution: {integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==} + dependencies: + undici-types: 5.26.5 + dev: true + /@types/node@20.8.9: resolution: {integrity: sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==} dependencies: @@ -15214,14 +15226,14 @@ packages: - supports-color dev: false - /electron@27.1.2: - resolution: {integrity: sha512-Dy6BUuGLiIJv+zfsXwr78TV2TNppi24rXF4PIIS+OjDblEKdkI9r1iM8JUd3/x3sbGUy5mdLMSPhvmu//IhkgA==} + /electron@29.1.0: + resolution: {integrity: sha512-giJVIm0sWVp+8V1GXrKqKTb+h7no0P3ooYqEd34AD9wMJzGnAeL+usj+R0155/0pdvvP1mgydnA7lcaFA2M9lw==} engines: {node: '>= 12.20.55'} hasBin: true requiresBuild: true dependencies: '@electron/get': 2.0.3 - '@types/node': 18.15.11 + '@types/node': 20.11.24 extract-zip: 2.0.1 transitivePeerDependencies: - supports-color