@lvce-editor/main-process 6.37.12 → 6.37.14
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 +9 -2
- package/package.json +1 -1
package/dist/mainProcessMain.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Electron from 'electron';
|
|
2
2
|
import Electron__default, { dialog, app, clipboard, BrowserWindow, MessageChannelMain, Menu, shell, desktopCapturer, contentTracing, net, netLog, powerSaveBlocker, safeStorage, screen, webContents, WebContentsView } from 'electron';
|
|
3
3
|
import process$1 from 'node:process';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
5
5
|
import { inspect } from 'node:util';
|
|
6
6
|
import { spawn } from 'node:child_process';
|
|
7
7
|
import { Console } from 'node:console';
|
|
@@ -5546,7 +5546,7 @@ const takeWorkerHeapSnapshot = async (windowId, workerName) => {
|
|
|
5546
5546
|
electronDebugger.off('message', handleMessage);
|
|
5547
5547
|
}
|
|
5548
5548
|
success = true;
|
|
5549
|
-
return filePath;
|
|
5549
|
+
return pathToFileURL(filePath).href;
|
|
5550
5550
|
} finally {
|
|
5551
5551
|
try {
|
|
5552
5552
|
if (fileDescriptor !== undefined) {
|
|
@@ -5837,13 +5837,20 @@ const stop = id => {
|
|
|
5837
5837
|
|
|
5838
5838
|
const Base64 = 'base64';
|
|
5839
5839
|
|
|
5840
|
+
const ensureEncryptionAvailable = () => {
|
|
5841
|
+
if (!safeStorage.isEncryptionAvailable() && isLinux) {
|
|
5842
|
+
safeStorage.setUsePlainTextEncryption(true);
|
|
5843
|
+
}
|
|
5844
|
+
};
|
|
5840
5845
|
const isEncryptionAvailable = () => {
|
|
5841
5846
|
return safeStorage.isEncryptionAvailable();
|
|
5842
5847
|
};
|
|
5843
5848
|
const encrypt = plainText => {
|
|
5849
|
+
ensureEncryptionAvailable();
|
|
5844
5850
|
return safeStorage.encryptString(plainText).toString(Base64);
|
|
5845
5851
|
};
|
|
5846
5852
|
const decrypt = encrypted => {
|
|
5853
|
+
ensureEncryptionAvailable();
|
|
5847
5854
|
const buffer = Buffer.from(encrypted, Base64);
|
|
5848
5855
|
return safeStorage.decryptString(buffer);
|
|
5849
5856
|
};
|