mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
Revert "fix : Cannot read properties of undefined (reading 'send') in mac os"
This commit is contained in:
4
.github/FUNDING.yml
vendored
4
.github/FUNDING.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
# These are supported funding model platforms
|
# These are supported funding model platforms
|
||||||
|
|
||||||
github: # [antares-sql,fabio286]
|
github: [antares-sql,fabio286]
|
||||||
patreon: #fabio286
|
patreon: #fabio286
|
||||||
open_collective: # Replace with a single Open Collective username
|
open_collective: # Replace with a single Open Collective username
|
||||||
ko_fi: # Replace with a single Ko-fi username
|
ko_fi: # Replace with a single Ko-fi username
|
||||||
@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
|
|||||||
liberapay: # Replace with a single Liberapay username
|
liberapay: # Replace with a single Liberapay username
|
||||||
issuehunt: # Replace with a single IssueHunt username
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
otechie: # Replace with a single Otechie username
|
otechie: # Replace with a single Otechie username
|
||||||
custom: # ['https://paypal.me/fabiodistasio']
|
custom: ['https://paypal.me/fabiodistasio']
|
||||||
|
1947
package-lock.json
generated
1947
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -214,8 +214,5 @@
|
|||||||
"vue-eslint-parser": "~8.3.0",
|
"vue-eslint-parser": "~8.3.0",
|
||||||
"webpack-dev-server": "~4.11.1",
|
"webpack-dev-server": "~4.11.1",
|
||||||
"xvfb-maybe": "~0.2.1"
|
"xvfb-maybe": "~0.2.1"
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
|
||||||
"dmg-license": "~1.0.11"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,13 +3,7 @@ export type LoggerLevel = 'query' | 'error'
|
|||||||
export const ipcLogger = ({ content, cUid, level }: {content: string; cUid: string; level: LoggerLevel}) => {
|
export const ipcLogger = ({ content, cUid, level }: {content: string; cUid: string; level: LoggerLevel}) => {
|
||||||
if (level === 'error') {
|
if (level === 'error') {
|
||||||
if (process.type !== undefined) {
|
if (process.type !== undefined) {
|
||||||
const contents = require('electron').webContents.getAllWebContents();
|
const mainWindow = require('electron').webContents.fromId(1);
|
||||||
let mainWindow = require('electron').webContents.fromId(1);
|
|
||||||
contents.forEach(content => {
|
|
||||||
if (content.send && mainWindow === undefined) {
|
|
||||||
mainWindow = content;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mainWindow.send('non-blocking-exception', { cUid, message: content, date: new Date() });
|
mainWindow.send('non-blocking-exception', { cUid, message: content, date: new Date() });
|
||||||
}
|
}
|
||||||
if (process.env.NODE_ENV === 'development' && process.type === 'browser') console.log(content);
|
if (process.env.NODE_ENV === 'development' && process.type === 'browser') console.log(content);
|
||||||
@@ -18,13 +12,7 @@ export const ipcLogger = ({ content, cUid, level }: {content: string; cUid: stri
|
|||||||
// Remove comments, newlines and multiple spaces
|
// Remove comments, newlines and multiple spaces
|
||||||
const escapedSql = content.replace(/(\/\*(.|[\r\n])*?\*\/)|(--(.*|[\r\n]))/gm, '').replace(/\s\s+/g, ' ');
|
const escapedSql = content.replace(/(\/\*(.|[\r\n])*?\*\/)|(--(.*|[\r\n]))/gm, '').replace(/\s\s+/g, ' ');
|
||||||
if (process.type !== undefined) {
|
if (process.type !== undefined) {
|
||||||
const contents = require('electron').webContents.getAllWebContents();
|
const mainWindow = require('electron').webContents.fromId(1);
|
||||||
let mainWindow = require('electron').webContents.fromId(1);
|
|
||||||
contents.forEach(content => {
|
|
||||||
if (content.send && mainWindow === undefined) {
|
|
||||||
mainWindow = content;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mainWindow.send('query-log', { cUid, sql: escapedSql, date: new Date() });
|
mainWindow.send('query-log', { cUid, sql: escapedSql, date: new Date() });
|
||||||
}
|
}
|
||||||
if (process.env.NODE_ENV === 'development' && process.type === 'browser') console.log(escapedSql);
|
if (process.env.NODE_ENV === 'development' && process.type === 'browser') console.log(escapedSql);
|
||||||
|
Reference in New Issue
Block a user