@lvce-editor/main-process 6.19.2 → 6.19.3

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.
@@ -11,7 +11,6 @@ import { dirname, join as join$1, isAbsolute } from 'node:path';
11
11
  import { homedir, tmpdir } from 'node:os';
12
12
  import { pbkdf2Sync, createDecipheriv, createHash } from 'node:crypto';
13
13
  import { DatabaseSync } from 'node:sqlite';
14
- import dbus, { Variant } from 'dbus-native';
15
14
  import { MessageChannel } from 'node:worker_threads';
16
15
 
17
16
  const scheme = 'lvce-oss';
@@ -4817,9 +4816,9 @@ const unlockItem = async (service, item) => {
4817
4816
  }
4818
4817
  throw new Error('Chrome Safe Storage could not be unlocked');
4819
4818
  };
4820
- const readPassword = async bus => {
4819
+ const readPassword = async (bus, sessionInput) => {
4821
4820
  const service = await bus.getService(secretServiceName).getInterface(secretServicePath, secretServiceInterface);
4822
- const [, sessionPath] = await service.OpenSession('plain', new Variant('s', ''));
4821
+ const [, sessionPath] = await service.OpenSession('plain', sessionInput);
4823
4822
  const item = await findChromeSafeStorageItem(bus, service);
4824
4823
  let secrets;
4825
4824
  try {
@@ -4838,11 +4837,15 @@ const getErrorMessage = error => {
4838
4837
  return error instanceof Error ? error.message : String(error);
4839
4838
  };
4840
4839
  const getChromeSafeStoragePassword = async () => {
4840
+ const {
4841
+ default: dbus,
4842
+ Variant
4843
+ } = await import('dbus-native');
4841
4844
  const bus = dbus.sessionBus({
4842
4845
  timeout: 5000
4843
4846
  });
4844
4847
  try {
4845
- return await readPassword(bus);
4848
+ return await readPassword(bus, new Variant('s', ''));
4846
4849
  } catch (error) {
4847
4850
  throw new Error(`Failed to read Chrome Safe Storage password: ${getErrorMessage(error)}`);
4848
4851
  } finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/main-process",
3
- "version": "6.19.2",
3
+ "version": "6.19.3",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "electron"