@lvce-editor/main-process 2.31.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mainProcessMain.js +12 -7
- package/package.json +1 -1
package/dist/mainProcessMain.js
CHANGED
|
@@ -764,10 +764,6 @@ const setLogsPath = value => {
|
|
|
764
764
|
app.setPath('logs', value);
|
|
765
765
|
};
|
|
766
766
|
|
|
767
|
-
const {
|
|
768
|
-
argv
|
|
769
|
-
} = process;
|
|
770
|
-
|
|
771
767
|
const Success = 0;
|
|
772
768
|
const Error$3 = 1;
|
|
773
769
|
|
|
@@ -4524,10 +4520,14 @@ const SecondInstance = 'second-instance';
|
|
|
4524
4520
|
const WindowAllClosed = 'window-all-closed';
|
|
4525
4521
|
const WebContentsCreated = 'web-contents-created';
|
|
4526
4522
|
|
|
4523
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
4527
4524
|
const setMenu = menu => {
|
|
4528
4525
|
Menu.setApplicationMenu(menu);
|
|
4529
4526
|
};
|
|
4530
4527
|
const click = async (menuItem, browserWindow, keys) => {
|
|
4528
|
+
if (!browserWindow) {
|
|
4529
|
+
return;
|
|
4530
|
+
}
|
|
4531
4531
|
await send$1('ElectronApplicationMenu.handleClick', browserWindow.id, menuItem.label);
|
|
4532
4532
|
};
|
|
4533
4533
|
const addClickListener = item => {
|
|
@@ -4540,7 +4540,8 @@ const addClickListener = item => {
|
|
|
4540
4540
|
}
|
|
4541
4541
|
return {
|
|
4542
4542
|
...item,
|
|
4543
|
-
click
|
|
4543
|
+
click,
|
|
4544
|
+
submenu: undefined
|
|
4544
4545
|
};
|
|
4545
4546
|
};
|
|
4546
4547
|
const setItems = items => {
|
|
@@ -4998,7 +4999,7 @@ const requestSingleInstanceLock = argv => {
|
|
|
4998
4999
|
// currently launching shared process takes 170ms
|
|
4999
5000
|
// which means first paint is delayed by a lot
|
|
5000
5001
|
|
|
5001
|
-
const hydrate = async () => {
|
|
5002
|
+
const hydrate = async (isLinux, chromeUserDataPath, argv) => {
|
|
5002
5003
|
setMenu(null); // performance
|
|
5003
5004
|
unhandled({
|
|
5004
5005
|
logger() {},
|
|
@@ -5060,6 +5061,10 @@ const hydrate = async () => {
|
|
|
5060
5061
|
debug('[info] app window created');
|
|
5061
5062
|
};
|
|
5062
5063
|
|
|
5064
|
+
const {
|
|
5065
|
+
argv
|
|
5066
|
+
} = process;
|
|
5067
|
+
|
|
5063
5068
|
const E_COMMAND_NOT_FOUND = 'E_COMMAND_NOT_FOUND';
|
|
5064
5069
|
const E_MODULE_NOT_FOUND = 'E_MODULE_NOT_FOUND';
|
|
5065
5070
|
|
|
@@ -7461,7 +7466,7 @@ const main = async () => {
|
|
|
7461
7466
|
// workaround for https://github.com/electron/electron/issues/36526
|
|
7462
7467
|
on$1('unhandledRejection', handleUnhandledRejection);
|
|
7463
7468
|
setLoad(load);
|
|
7464
|
-
await hydrate();
|
|
7469
|
+
await hydrate(isLinux, chromeUserDataPath, argv);
|
|
7465
7470
|
};
|
|
7466
7471
|
|
|
7467
7472
|
main();
|