@lvce-editor/shared-process 0.119.17 → 0.119.19
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/config/defaultSettings.json +1 -0
- package/package.json +3 -3
- package/src/parts/AppWindow/AppWindow.js +11 -0
- package/src/parts/BuiltinExtensionsPath/BuiltinExtensionsPath.js +1 -1
- package/src/parts/Module/Module.js +2 -0
- package/src/parts/ModuleId/ModuleId.js +2 -0
- package/src/parts/ModuleMap/ModuleMap.js +2 -0
- package/src/parts/Platform/Platform.js +3 -3
- package/src/parts/PreloadUrl/PreloadUrl.js +1 -1
- package/src/parts/StartupCpuProfile/StartupCpuProfile.ipc.js +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.119.
|
|
3
|
+
"version": "0.119.19",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"@lvce-editor/assert": "1.9.0",
|
|
21
21
|
"@lvce-editor/file-watcher-explorer": "0.1.1",
|
|
22
22
|
"@lvce-editor/ipc": "16.12.2",
|
|
23
|
-
"@lvce-editor/json-rpc": "8.
|
|
23
|
+
"@lvce-editor/json-rpc": "8.9.0",
|
|
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.
|
|
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', '
|
|
6
|
+
const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'e465269', '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:
|
|
@@ -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.
|
|
59
|
+
export const version = '0.119.19'
|
|
60
60
|
|
|
61
|
-
export const commit = '
|
|
61
|
+
export const commit = 'e465269'
|
|
62
62
|
|
|
63
|
-
export const date = '2026-10-
|
|
63
|
+
export const date = '2026-10-03T16:37:14.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', '
|
|
5
|
+
return join(Root.root, 'static', 'e465269', 'packages', 'preload', 'dist', 'index.js')
|
|
6
6
|
}
|