@lvce-editor/main-process 6.19.2 → 6.19.4

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';
@@ -3728,7 +3727,8 @@ const enable$1 = parsedCliArgs => {
3728
3727
  if (parsedCliArgs.sandbox) {
3729
3728
  enableSandbox();
3730
3729
  } else {
3731
- // see https://github.com/microsoft/vscode/issues/151187#issuecomment-1221475319
3730
+ // The GPU sandbox must also be disabled when Chromium's sandbox was explicitly disabled.
3731
+ // See https://github.com/microsoft/vscode/issues/151187#issuecomment-1221475319
3732
3732
  if (isLinux) {
3733
3733
  // @ts-ignore
3734
3734
  appendCommandLineSwitch('--disable-gpu-sandbox');
@@ -4038,7 +4038,7 @@ const parseCliArgs = argv => {
4038
4038
  },
4039
4039
  boolean: [Version, Help, Wait, BuiltinSelfTest, Web, SandBox],
4040
4040
  default: {
4041
- sandbox: false
4041
+ sandbox: true
4042
4042
  },
4043
4043
  string: [Prompt]
4044
4044
  };
@@ -4817,9 +4817,9 @@ const unlockItem = async (service, item) => {
4817
4817
  }
4818
4818
  throw new Error('Chrome Safe Storage could not be unlocked');
4819
4819
  };
4820
- const readPassword = async bus => {
4820
+ const readPassword = async (bus, sessionInput) => {
4821
4821
  const service = await bus.getService(secretServiceName).getInterface(secretServicePath, secretServiceInterface);
4822
- const [, sessionPath] = await service.OpenSession('plain', new Variant('s', ''));
4822
+ const [, sessionPath] = await service.OpenSession('plain', sessionInput);
4823
4823
  const item = await findChromeSafeStorageItem(bus, service);
4824
4824
  let secrets;
4825
4825
  try {
@@ -4838,11 +4838,15 @@ const getErrorMessage = error => {
4838
4838
  return error instanceof Error ? error.message : String(error);
4839
4839
  };
4840
4840
  const getChromeSafeStoragePassword = async () => {
4841
+ const {
4842
+ default: dbus,
4843
+ Variant
4844
+ } = await import('dbus-native');
4841
4845
  const bus = dbus.sessionBus({
4842
4846
  timeout: 5000
4843
4847
  });
4844
4848
  try {
4845
- return await readPassword(bus);
4849
+ return await readPassword(bus, new Variant('s', ''));
4846
4850
  } catch (error) {
4847
4851
  throw new Error(`Failed to read Chrome Safe Storage password: ${getErrorMessage(error)}`);
4848
4852
  } 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.4",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "electron"