@lvce-editor/shared-process 0.92.0 → 0.93.1

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.92.0",
3
+ "version": "0.93.1",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -19,7 +19,7 @@
19
19
  "dependencies": {
20
20
  "@lvce-editor/assert": "1.7.0",
21
21
  "@lvce-editor/auth-process": "1.10.0",
22
- "@lvce-editor/extension-host-helper-process": "0.92.0",
22
+ "@lvce-editor/extension-host-helper-process": "0.93.1",
23
23
  "@lvce-editor/ipc": "16.4.0",
24
24
  "@lvce-editor/json-rpc": "8.3.0",
25
25
  "@lvce-editor/jsonc-parser": "1.5.0",
@@ -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', 'b2786da', 'extensions')
6
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'e4f3e54', 'extensions')
7
7
  return builtinExtensionsPath
8
8
  }
@@ -4,5 +4,4 @@ export const name = 'ElectronDeveloper'
4
4
 
5
5
  export const Commands = {
6
6
  getPerformanceEntries: ElectronDeveloper.getPerformanceEntries,
7
- takeWorkerHeapSnapshot: ElectronDeveloper.takeWorkerHeapSnapshot,
8
7
  }
@@ -3,7 +3,3 @@ import * as ParentIpc from '../MainProcess/MainProcess.js'
3
3
  export const getPerformanceEntries = () => {
4
4
  return ParentIpc.invoke('ElectronDeveloper.getPerformanceEntries')
5
5
  }
6
-
7
- export const takeWorkerHeapSnapshot = (windowId, workerName) => {
8
- return ParentIpc.invoke('ElectronDeveloper.takeWorkerHeapSnapshot', windowId, workerName)
9
- }
@@ -126,6 +126,16 @@ const copyStaticFiles = async (root, serverStaticPath) => {
126
126
  await FileSystem.copy(serverStaticPath, Path.join(root, 'dist'))
127
127
  }
128
128
 
129
+ export const validateRendererProcessArtifacts = ({ commitHash, root } ) => {
130
+ const rendererProcessDistPath = Path.join(root, 'dist', commitHash, 'packages', 'renderer-process', 'dist')
131
+ for (const artifactName of ['rendererProcessMain.js', 'xterm.js']) {
132
+ const artifactPath = Path.join(rendererProcessDistPath, artifactName)
133
+ if (!existsSync(artifactPath)) {
134
+ throw new Error(`renderer process artifact not found: ${artifactPath}`)
135
+ }
136
+ }
137
+ }
138
+
129
139
  const applyOverridesRendererProcess = async ({ commitHash, pathPrefix, root } ) => {
130
140
  await replace(
131
141
  Path.join(root, 'dist', commitHash, 'packages', 'renderer-process', 'dist', 'rendererProcessMain.js'),
@@ -720,6 +730,7 @@ export const exportStatic = async ({
720
730
  console.time('copyStaticFiles')
721
731
  await copyStaticFiles(root, serverStaticPath)
722
732
  console.timeEnd('copyStaticFiles')
733
+ validateRendererProcessArtifacts({ commitHash, root })
723
734
 
724
735
  console.time('applyOverrides')
725
736
  await applyOverrides({
@@ -1,16 +1,26 @@
1
- import { rm } from 'node:fs/promises'
1
+ import { access, rm } from 'node:fs/promises'
2
2
  import * as Path from '../Path/Path.js'
3
3
  import * as PlatformPaths from '../PlatformPaths/PlatformPaths.js'
4
+ import * as Trash from '../Trash/Trash.js'
4
5
  import { VError } from '../VError/VError.js'
5
6
 
6
7
  export const uninstall = async (id) => {
8
+ const extensionsPath = PlatformPaths.getExtensionsPath()
9
+ const extensionPath = Path.join(extensionsPath, id)
7
10
  try {
8
- const extensionsPath = PlatformPaths.getExtensionsPath()
9
- await rm(Path.join(extensionsPath, id), { recursive: true })
11
+ await access(extensionPath)
12
+ } catch (error) {
13
+ throw new VError(error, `Failed to uninstall extension "${id}"`)
14
+ }
15
+ try {
16
+ await Trash.trash(extensionPath)
17
+ return
18
+ } catch {
19
+ // Fall back to permanent deletion when the platform trash is unavailable.
20
+ }
21
+ try {
22
+ await rm(extensionPath, { recursive: true })
10
23
  } catch (error) {
11
- // if (error.code === 'ENOENT') {
12
- // return
13
- // }
14
24
  throw new VError(error, `Failed to uninstall extension "${id}"`)
15
25
  }
16
26
  }
@@ -52,7 +52,6 @@ export const getModuleId = (commandId) => {
52
52
  case 'ElectronContextMenu.openContextMenu':
53
53
  return ModuleId.ElectronContextMenu
54
54
  case 'ElectronDeveloper.getPerformanceEntries':
55
- case 'ElectronDeveloper.takeWorkerHeapSnapshot':
56
55
  return ModuleId.ElectronDeveloper
57
56
  case 'ElectronDialog.showMessageBox':
58
57
  case 'ElectronDialog.showOpenDialog':
@@ -61,11 +61,11 @@ export const getSetupName = () => {
61
61
  return 'Lvce-Setup'
62
62
  }
63
63
 
64
- export const version = '0.92.0'
64
+ export const version = '0.93.1'
65
65
 
66
- export const commit = 'b2786da'
66
+ export const commit = 'e4f3e54'
67
67
 
68
- export const date = '2026-07-20T03:27:44.000Z'
68
+ export const date = '2026-07-21T04:27:58.000Z'
69
69
 
70
70
  export const getVersion = () => {
71
71
  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', 'b2786da', 'packages', 'preload', 'dist', 'index.js')
5
+ return join(Root.root, 'static', 'e4f3e54', 'packages', 'preload', 'dist', 'index.js')
6
6
  }