feature/IO-3725-RPS-Changes - Deprecations / Bug fixes
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -115,5 +115,5 @@ firebase/.env
|
||||
deploy.ps1
|
||||
macbuild.sh
|
||||
Usage.md
|
||||
dist-electron
|
||||
.idea
|
||||
.idea
|
||||
/dist-electron/
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
console.log("Running preloader!");var{contextBridge:l,ipcRenderer:n}=require("electron");l.exposeInMainWorld("logger",{info:(...e)=>{console.log(...e)},debug:(...e)=>{console.log(...e)},warn:(...e)=>{console.log(...e)},error:(...e)=>{console.log(...e)},silly:(...e)=>{console.log(...e)}});l.exposeInMainWorld("ipcRenderer",{send:(e,o)=>{n.send(e,o)},on:(e,o)=>{n.on(e,o)},invoke:(e,o)=>n.invoke(e,o),removeAllListeners:(...e)=>{n.removeAllListeners(...e)}});
|
||||
@@ -1,7 +1,6 @@
|
||||
const { ipcMain, dialog } = require("electron");
|
||||
const { ipcMain, dialog, BrowserWindow } = require("electron");
|
||||
|
||||
const ipcTypes = require("../../src/ipc.types.commonjs");
|
||||
const { mainWindow } = require("../main");
|
||||
const _ = require("lodash");
|
||||
const { store } = require("../electron-store");
|
||||
const path = require("path");
|
||||
@@ -9,7 +8,8 @@ var xlsx = require("node-xlsx");
|
||||
const log = require("electron-log");
|
||||
|
||||
ipcMain.on(ipcTypes.default.audit.toMain.browseForFile, async (event, { sheetName }) => {
|
||||
const result = await dialog.showOpenDialog(mainWindow, {
|
||||
const parentWindow = BrowserWindow.fromWebContents(event.sender);
|
||||
const result = await dialog.showOpenDialog(parentWindow, {
|
||||
filters: [{ extensions: ["xls", "xlsx"], name: "Excel Files" }],
|
||||
properties: ["openFile"]
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
const { ipcMain, dialog } = require("electron");
|
||||
const { ipcMain, dialog, BrowserWindow } = require("electron");
|
||||
const { StartWatcher, StopWatcher } = require("./file-watcher");
|
||||
const ipcTypes = require("../../src/ipc.types.commonjs");
|
||||
const { mainWindow } = require("../main");
|
||||
const _ = require("lodash");
|
||||
const { store } = require("../electron-store");
|
||||
const path = require("path");
|
||||
@@ -34,7 +33,8 @@ ipcMain.on(ipcTypes.default.fileWatcher.toMain.stop, async (event, arg) => {
|
||||
});
|
||||
|
||||
ipcMain.on(ipcTypes.default.fileWatcher.toMain.addPath, async (event, arg) => {
|
||||
const result = await dialog.showOpenDialog(mainWindow, {
|
||||
const parentWindow = BrowserWindow.fromWebContents(event.sender);
|
||||
const result = await dialog.showOpenDialog(parentWindow, {
|
||||
properties: ["openDirectory"],
|
||||
});
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@ const log = require("electron-log");
|
||||
const contextMenu = require("electron-context-menu");
|
||||
const Sentry = require("@sentry/electron/main");
|
||||
|
||||
const enableDevTools = isDev || process.env.ELECTRON_ENABLE_DEVTOOLS === "1"; // Always enable dev tools (was: isDev || process.env.ELECTRON_ENABLE_DEVTOOLS === "1")
|
||||
const enableDevTools = isDev || process.env.ELECTRON_ENABLE_DEVTOOLS === "1";
|
||||
const openDevToolsOnStart = enableDevTools && process.env.ELECTRON_OPEN_DEVTOOLS === "1";
|
||||
const installReactDevTools = process.env.ELECTRON_INSTALL_REACT_DEVTOOLS === "1";
|
||||
|
||||
//const Nucleus = require("nucleus-nodejs");
|
||||
require("./ipc-main-handler");
|
||||
@@ -16,6 +18,7 @@ require("./analytics");
|
||||
|
||||
Sentry.init({
|
||||
dsn: "https://9840e0f304124299e379d9347e12d2e6@o492140.ingest.sentry.io/4505728058523648",
|
||||
ipcMode: Sentry.IPCMode.Protocol,
|
||||
ignoreErrors: [
|
||||
"SimpleURLLoaderWrapper",
|
||||
"Cannot read properties of null (reading 'webContents')",
|
||||
@@ -28,9 +31,9 @@ autoUpdater.logger = log;
|
||||
autoUpdater.logger.transports.file.level = "info";
|
||||
log.info("App starting...", app.getVersion());
|
||||
|
||||
// Conditionally include the dev tools installer to load React Dev Tools
|
||||
// Conditionally include the dev tools installer to load React DevTools.
|
||||
let installExtension, REACT_DEVELOPER_TOOLS;
|
||||
if (isDev) {
|
||||
if (isDev && installReactDevTools) {
|
||||
const devTools = require("electron-devtools-installer");
|
||||
installExtension = devTools.default;
|
||||
REACT_DEVELOPER_TOOLS = devTools.REACT_DEVELOPER_TOOLS;
|
||||
@@ -201,8 +204,9 @@ function createWindow() {
|
||||
app.quit();
|
||||
});
|
||||
|
||||
// Open the DevTools when explicitly enabled.
|
||||
if (enableDevTools) {
|
||||
// Open DevTools only when explicitly requested. DevTools itself emits
|
||||
// Chromium protocol noise such as Autofill.* messages in Electron.
|
||||
if (openDevToolsOnStart) {
|
||||
mainWindow.webContents.openDevTools({
|
||||
// mode: "detach"
|
||||
});
|
||||
@@ -221,7 +225,6 @@ function createWindow() {
|
||||
}
|
||||
}
|
||||
|
||||
exports.mainWindow = mainWindow;
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
@@ -231,9 +234,11 @@ app.whenReady().then(() => {
|
||||
if (isDev) {
|
||||
console.log(`Path to Settings File: ${store.path}`);
|
||||
console.log(`Path to Log File: ${log.log}`);
|
||||
installExtension(REACT_DEVELOPER_TOOLS)
|
||||
.then((name) => console.log(`Added Extension: ${name}`))
|
||||
.catch((error) => console.log(`An error occurred: , ${error}`));
|
||||
if (installReactDevTools) {
|
||||
installExtension(REACT_DEVELOPER_TOOLS)
|
||||
.then((name) => console.log(`Added Extension: ${name}`))
|
||||
.catch((error) => console.log(`An error occurred: , ${error}`));
|
||||
}
|
||||
}
|
||||
|
||||
setInterval(() => {
|
||||
|
||||
1305
package-lock.json
generated
1305
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
36
package.json
36
package.json
@@ -7,47 +7,47 @@
|
||||
"main": "electron/main.js",
|
||||
"homepage": "./",
|
||||
"dependencies": {
|
||||
"@amplitude/analytics-node": "^1.5.10",
|
||||
"@ant-design/pro-layout": "^7.22.3",
|
||||
"@amplitude/analytics-node": "^1.5.58",
|
||||
"@ant-design/pro-layout": "^7.22.7",
|
||||
"@apollo/client": "^3.13.4",
|
||||
"@sentry/electron": "^6.1.0",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"antd": "^5.24.3",
|
||||
"apollo-link-logger": "^2.0.1",
|
||||
"apollo-link-sentry": "^4.1.0",
|
||||
"axios": "^1.10.0",
|
||||
"axios": "^1.16.1",
|
||||
"chokidar": "^4.0.3",
|
||||
"dayjs": "^1.11.13",
|
||||
"dayjs-business-days2": "^1.3.0",
|
||||
"dayjs": "^1.11.21",
|
||||
"dayjs-business-days2": "^1.3.3",
|
||||
"dbffile": "^1.12.0",
|
||||
"dinero.js": "^1.9.1",
|
||||
"electron-context-menu": "^3.6.1",
|
||||
"electron-is-dev": "^2.0.0",
|
||||
"electron-log": "^5.3.2",
|
||||
"electron-log": "^5.4.4",
|
||||
"electron-reload": "^2.0.0-alpha.1",
|
||||
"electron-store": "^8.2.0",
|
||||
"electron-updater": "^6.3.9",
|
||||
"electron-updater": "^6.8.3",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-react-app": "^7.0.1",
|
||||
"firebase": "^11.4.0",
|
||||
"graphql": "^16.10.0",
|
||||
"lodash": "^4.17.21",
|
||||
"graphql": "^16.14.0",
|
||||
"lodash": "^4.18.1",
|
||||
"logrocket": "^9.0.2",
|
||||
"moment": "^2.30.1",
|
||||
"node-xlsx": "^0.24.0",
|
||||
"query-string": "^9.1.1",
|
||||
"query-string": "^9.4.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-infinite-scroller": "^1.2.6",
|
||||
"react-redux": "^9.2.0",
|
||||
"react-redux": "^9.3.0",
|
||||
"react-router-dom": "^6.22.3",
|
||||
"react-to-print": "^3.0.5",
|
||||
"react-to-print": "^3.3.0",
|
||||
"recharts": "^2.15.1",
|
||||
"redux": "^5.0.1",
|
||||
"redux-logger": "^3.0.6",
|
||||
"redux-persist": "^6.0.0",
|
||||
"redux-saga": "^1.3.0",
|
||||
"reselect": "^5.1.1",
|
||||
"redux-saga": "^1.5.0",
|
||||
"reselect": "^5.2.0",
|
||||
"vite-plugin-ejs": "^1.7.0"
|
||||
},
|
||||
"scripts": {
|
||||
@@ -84,14 +84,14 @@
|
||||
"electron": "^35.0.1",
|
||||
"electron-builder": "^25.1.8",
|
||||
"electron-devtools-installer": "^4.0.0",
|
||||
"esbuild": "^0.25.1",
|
||||
"esbuild": "^0.28.0",
|
||||
"eslint-config-react": "^1.1.7",
|
||||
"sass-embedded": "^1.93.1",
|
||||
"sass-embedded": "^1.100.0",
|
||||
"vite": "^6.2.1",
|
||||
"vite-plugin-babel": "^1.3.0",
|
||||
"vite-plugin-babel": "^1.7.3",
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-plugin-legacy": "^2.1.0",
|
||||
"vite-plugin-node-polyfills": "^0.23.0",
|
||||
"vite-plugin-node-polyfills": "^0.28.0",
|
||||
"vite-plugin-style-import": "^2.0.0"
|
||||
},
|
||||
"build": {
|
||||
|
||||
Reference in New Issue
Block a user