@lvce-editor/shared-process 0.125.20 → 0.125.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.125.20",
3
+ "version": "0.125.22",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -3,6 +3,6 @@ import { fileURLToPath } from 'url'
3
3
 
4
4
  export const getBuiltinExtensionsPath = () => {
5
5
  const staticServerPath = fileURLToPath(import.meta.resolve('@lvce-editor/static-server'))
6
- const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '351e02e', 'extensions')
6
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '2d6096f', 'extensions')
7
7
  return builtinExtensionsPath
8
8
  }
@@ -1,3 +1,4 @@
1
+ import * as ElectronDialog from '../ElectronDialog/ElectronDialog.ipc.js'
1
2
  import * as ModuleId from '../ModuleId/ModuleId.js'
2
3
 
3
4
  export const load = (moduleId) => {
@@ -37,7 +38,8 @@ export const load = (moduleId) => {
37
38
  case ModuleId.ElectronDeveloper:
38
39
  return import('../ElectronDeveloper/ElectronDeveloper.ipc.js')
39
40
  case ModuleId.ElectronDialog:
40
- return import('../ElectronDialog/ElectronDialog.ipc.js')
41
+ // Close confirmation and saving must survive removal of an old build's chunks.
42
+ return ElectronDialog
41
43
  case ModuleId.ElectronInitialize:
42
44
  return import('../ElectronInitialize/ElectronInitialize.ipc.js')
43
45
  case ModuleId.ElectronNet:
@@ -56,11 +56,11 @@ export const getSetupName = () => {
56
56
  return 'Lvce-Setup'
57
57
  }
58
58
 
59
- export const version = '0.125.20'
59
+ export const version = '0.125.22'
60
60
 
61
- export const commit = '351e02e'
61
+ export const commit = '2d6096f'
62
62
 
63
- export const date = '2026-10-26T01:51:06.000Z'
63
+ export const date = '2026-10-26T10:31:08.000Z'
64
64
 
65
65
  export const getVersion = () => {
66
66
  return version
@@ -2,5 +2,5 @@ import { join } from 'node:path'
2
2
  import * as Root from '../Root/Root.js'
3
3
 
4
4
  export const getPreloadUrl = () => {
5
- return join(Root.root, 'static', '351e02e', 'packages', 'preload', 'dist', 'index.js')
5
+ return join(Root.root, 'static', '2d6096f', 'packages', 'preload', 'dist', 'index.js')
6
6
  }
@@ -14,14 +14,19 @@ export const getOrCreate = async () => {
14
14
  state.ipc = ipcPromise
15
15
  ipcPromise.then(
16
16
  (ipc) => {
17
- ipc.on('close', () => {
17
+ const handleClose = () => {
18
18
  // A late close from an old process must not invalidate its replacement.
19
19
  if (state.ipc !== ipcPromise) {
20
20
  return
21
21
  }
22
22
  state.ipc = undefined
23
23
  state.refCount = 0
24
- })
24
+ }
25
+ if (ipc.addEventListener) {
26
+ ipc.addEventListener('close', handleClose)
27
+ } else {
28
+ ipc.on('close', handleClose)
29
+ }
25
30
  },
26
31
  () => {
27
32
  if (state.ipc === ipcPromise) {