@lvce-editor/main-process 6.37.15 → 6.37.16
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 +10 -0
- package/package.json +1 -1
package/dist/mainProcessMain.js
CHANGED
|
@@ -3818,9 +3818,15 @@ const handleBeforeQuit = () => {
|
|
|
3818
3818
|
|
|
3819
3819
|
const Base64 = 'base64';
|
|
3820
3820
|
|
|
3821
|
+
const getSelectedStorageBackend = () => {
|
|
3822
|
+
return safeStorage.getSelectedStorageBackend();
|
|
3823
|
+
};
|
|
3821
3824
|
const isEncryptionAvailable = () => {
|
|
3822
3825
|
return safeStorage.isEncryptionAvailable();
|
|
3823
3826
|
};
|
|
3827
|
+
const setUsePlainTextEncryption = usePlainText => {
|
|
3828
|
+
safeStorage.setUsePlainTextEncryption(usePlainText);
|
|
3829
|
+
};
|
|
3824
3830
|
const encrypt = plainText => {
|
|
3825
3831
|
return safeStorage.encryptString(plainText).toString(Base64);
|
|
3826
3832
|
};
|
|
@@ -3836,6 +3842,10 @@ const ensurePersistentSecretStorage = argv => {
|
|
|
3836
3842
|
if (!isLinux || isEncryptionAvailable()) {
|
|
3837
3843
|
return true;
|
|
3838
3844
|
}
|
|
3845
|
+
if (getSelectedStorageBackend() === 'basic_text') {
|
|
3846
|
+
setUsePlainTextEncryption(true);
|
|
3847
|
+
return true;
|
|
3848
|
+
}
|
|
3839
3849
|
if (hasPasswordStoreArgument(argv)) {
|
|
3840
3850
|
throw new Error('Persistent secret storage is unavailable');
|
|
3841
3851
|
}
|