@lvce-editor/shared-process 0.119.17 → 0.119.18

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.
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "git.remoteHosts": { "github.com": "https://github.com" },
3
3
  "application.updateMode": "none",
4
+ "application.memoryUsage": "default",
4
5
  "application.useOnLoadJson": false,
5
6
 
6
7
  "breadcrumbs.enabled": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.119.17",
3
+ "version": "0.119.18",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -24,7 +24,7 @@
24
24
  "@lvce-editor/jsonc-parser": "1.5.2",
25
25
  "@lvce-editor/pretty-error": "2.0.2",
26
26
  "@lvce-editor/process-explorer": "3.32.1",
27
- "@lvce-editor/rpc-registry": "9.65.4",
27
+ "@lvce-editor/rpc-registry": "9.66.0",
28
28
  "@lvce-editor/verror": "1.7.0",
29
29
  "is-object": "^1.0.2",
30
30
  "xdg-basedir": "^5.1.0"
@@ -40,6 +40,17 @@ const getAbsolutePath = (parsedArgs, workingDirectory) => {
40
40
  const getAppWindowUrl = async (url, parsedArgs, workingDirectory) => {
41
41
  const parsedUrl = new URL(getValidatedAppUrl(url))
42
42
  const absolutePath = getAbsolutePath(parsedArgs, workingDirectory)
43
+ if (parsedArgs?.['cpu-profile']) {
44
+ if (typeof parsedArgs.open !== 'string' || !parsedArgs.open) throw new Error('--cpu-profile requires --open <file>')
45
+ const workspace = absolutePath || workingDirectory
46
+ if (!(await stat(workspace)).isDirectory()) throw new Error('CPU profiling requires a project folder')
47
+ const file = resolve(workspace, parsedArgs.open)
48
+ if (!(await stat(file)).isFile()) throw new Error('CPU profiling requires a file to open')
49
+ parsedUrl.searchParams.set('workspace', pathToFileURL(workspace).toString())
50
+ parsedUrl.searchParams.set('openUri', pathToFileURL(file).toString())
51
+ parsedUrl.searchParams.set('cpuProfile', '1')
52
+ return parsedUrl.toString()
53
+ }
43
54
  if (!absolutePath) {
44
55
  return parsedUrl.toString()
45
56
  }
@@ -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', 'a8f10b9', 'extensions')
6
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'a37a8c8', 'extensions')
7
7
  return builtinExtensionsPath
8
8
  }
@@ -154,6 +154,8 @@ export const load = (moduleId) => {
154
154
  return import('../SendMessagePortToMainProcess/SendMessagePortToMainProcess.ipc.js')
155
155
  case ModuleId.ShellCommand:
156
156
  return import('../ShellCommand/ShellCommand.ipc.js')
157
+ case ModuleId.StartupCpuProfile:
158
+ return import('../StartupCpuProfile/StartupCpuProfile.ipc.js')
157
159
  case ModuleId.TemporaryMessagePort:
158
160
  return import('../TemporaryMessagePort/TemporaryMessagePort.ipc.js')
159
161
  case ModuleId.Terminal:
@@ -84,3 +84,5 @@ export const RemoteCli = 96
84
84
  export const BrowserFind = 97
85
85
  export const ShellCommand = 98
86
86
  export const PtyHost = 99
87
+
88
+ export const StartupCpuProfile = 101
@@ -305,6 +305,8 @@ export const getModuleId = (commandId) => {
305
305
  case 'ShellCommand.getMenuEntries':
306
306
  case 'ShellCommand.install':
307
307
  return ModuleId.ShellCommand
308
+ case 'StartupCpuProfile.complete':
309
+ return ModuleId.StartupCpuProfile
308
310
  case 'TemporaryMessagePort.getPortTuple2':
309
311
  case 'TemporaryMessagePort.getPortTuple3':
310
312
  case 'TemporaryMessagePort.handlePorts':
@@ -56,11 +56,11 @@ export const getSetupName = () => {
56
56
  return 'Lvce-Setup'
57
57
  }
58
58
 
59
- export const version = '0.119.17'
59
+ export const version = '0.119.18'
60
60
 
61
- export const commit = 'a8f10b9'
61
+ export const commit = 'a37a8c8'
62
62
 
63
- export const date = '2026-10-01T21:55:13.000Z'
63
+ export const date = '2026-10-02T19:24:01.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', 'a8f10b9', 'packages', 'preload', 'dist', 'index.js')
5
+ return join(Root.root, 'static', 'a37a8c8', 'packages', 'preload', 'dist', 'index.js')
6
6
  }
@@ -0,0 +1,7 @@
1
+ import * as ParentIpc from '../MainProcess/MainProcess.js'
2
+
3
+ export const name = 'StartupCpuProfile'
4
+
5
+ export const Commands = {
6
+ complete: (error = '') => ParentIpc.invoke('StartupCpuProfile.complete', error),
7
+ }