@lvce-editor/shared-process 0.22.0 → 0.22.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 +4 -4
- package/src/parts/ElectronWindowProcessExplorer/ElectronWindowProcessExplorer.js +2 -1
- package/src/parts/GetAccurateMemoryUsage/GetAccurateMemoryUsage.js +4 -0
- package/src/parts/GetAppWindowOptions/GetAppWindowOptions.js +1 -1
- package/src/parts/GetProcessExplorerUrl/GetProcessExplorerUrl.js +0 -6
- package/src/parts/GetTerminalSpawnOptions/GetTerminalSpawnOptions.js +6 -0
- package/src/parts/HandleMessagePortForExtensionHostHelperProcess/HandleMessagePortForExtensionHostHelperProcess.ipc.js +7 -0
- package/src/parts/HandleMessagePortForExtensionHostHelperProcess/HandleMessagePortForExtensionHostHelperProcess.js +8 -0
- package/src/parts/Module/Module.js +2 -0
- package/src/parts/ModuleId/ModuleId.js +1 -0
- package/src/parts/ModuleMap/ModuleMap.js +2 -0
- package/src/parts/Platform/Platform.js +3 -3
- package/src/parts/Git/Git.js +0 -58
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@lvce-editor/assert": "^1.0.1",
|
|
21
|
-
"@lvce-editor/extension-host": "0.22.
|
|
22
|
-
"@lvce-editor/extension-host-helper-process": "0.22.
|
|
21
|
+
"@lvce-editor/extension-host": "0.22.1",
|
|
22
|
+
"@lvce-editor/extension-host-helper-process": "0.22.1",
|
|
23
23
|
"@lvce-editor/json-rpc": "^1.0.0",
|
|
24
24
|
"@lvce-editor/jsonc-parser": "^1.1.0",
|
|
25
25
|
"@lvce-editor/pretty-error": "^1.3.0",
|
|
26
|
-
"@lvce-editor/pty-host": "0.22.
|
|
26
|
+
"@lvce-editor/pty-host": "0.22.1",
|
|
27
27
|
"@lvce-editor/verror": "^1.1.2",
|
|
28
28
|
"debug": "^4.3.4",
|
|
29
29
|
"execa": "^8.0.1",
|
|
@@ -2,12 +2,13 @@ import { writeFile } from 'node:fs/promises'
|
|
|
2
2
|
import { tmpdir } from 'node:os'
|
|
3
3
|
import { join } from 'node:path'
|
|
4
4
|
import * as ColorTheme from '../ColorTheme/ColorTheme.js'
|
|
5
|
+
import * as GetPreloadUrl from '../GetPreloadUrl/GetPreloadUrl.js'
|
|
5
6
|
import * as GetProcessExplorerUrl from '../GetProcessExplorerUrl/GetProcessExplorerUrl.js'
|
|
6
7
|
import * as ParentIpc from '../ParentIpc/ParentIpc.js'
|
|
7
8
|
|
|
8
9
|
const getOptions = async (colorThemeJson) => {
|
|
9
10
|
const backgroundColor = colorThemeJson.MainBackground
|
|
10
|
-
const preload =
|
|
11
|
+
const preload = GetPreloadUrl.getPreloadUrl()
|
|
11
12
|
const options = {
|
|
12
13
|
width: 800,
|
|
13
14
|
height: 500,
|
|
@@ -5,6 +5,7 @@ import * as EncodingType from '../EncodingType/EncodingType.js'
|
|
|
5
5
|
import * as IsEnoentError from '../IsEnoentError/IsEnoentError.js'
|
|
6
6
|
import * as IsEsrchError from '../IsEsrchError/IsEsrchError.js'
|
|
7
7
|
import * as ParseMemory from '../ParseMemory/ParseMemory.js'
|
|
8
|
+
import * as Platform from '../Platform/Platform.js'
|
|
8
9
|
import { VError } from '../VError/VError.js'
|
|
9
10
|
|
|
10
11
|
const getContent = async (pid) => {
|
|
@@ -23,6 +24,9 @@ const getContent = async (pid) => {
|
|
|
23
24
|
export const getAccurateMemoryUsage = async (pid) => {
|
|
24
25
|
try {
|
|
25
26
|
Assert.number(pid)
|
|
27
|
+
if (Platform.isMacOs) {
|
|
28
|
+
return 0
|
|
29
|
+
}
|
|
26
30
|
const content = await getContent(pid)
|
|
27
31
|
if (!content) {
|
|
28
32
|
return -1
|
|
@@ -7,7 +7,7 @@ export const getAppWindowOptions = (preferences, screenWidth, screenHeight) => {
|
|
|
7
7
|
const titleBarStyle = titleBarPreference === 'custom' ? 'hidden' : undefined
|
|
8
8
|
const zoomLevelPreference = preferences['window.zoomLevel']
|
|
9
9
|
const zoomLevel = zoomLevelPreference
|
|
10
|
-
const windowControlsOverlayPreference = Platform.isWindows && preferences['window.controlsOverlay.enabled']
|
|
10
|
+
const windowControlsOverlayPreference = (Platform.isWindows || Platform.isMacOs) && preferences['window.controlsOverlay.enabled']
|
|
11
11
|
|
|
12
12
|
const titleBarOverlay = windowControlsOverlayPreference
|
|
13
13
|
? {
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import * as Path from '../Path/Path.js'
|
|
2
1
|
import * as Platform from '../Platform/Platform.js'
|
|
3
|
-
import * as Root from '../Root/Root.js'
|
|
4
2
|
|
|
5
3
|
export const getProcessExplorerUrl = () => {
|
|
6
4
|
return `${Platform.scheme}://-/packages/main-process/pages/process-explorer/process-explorer.html`
|
|
7
5
|
}
|
|
8
|
-
|
|
9
|
-
export const getProcessExplorerPreloadUrl = () => {
|
|
10
|
-
return Path.join(Root.root, 'packages', 'main-process', 'src', 'preload.js')
|
|
11
|
-
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as HandleMessagePortForExtensionHostHelperProcess from './HandleMessagePortForExtensionHostHelperProcess.js'
|
|
2
|
+
|
|
3
|
+
export const name = 'HandleMessagePortForExtensionHostHelperProcess'
|
|
4
|
+
|
|
5
|
+
export const Commands = {
|
|
6
|
+
handleMessagePortForExtensionHostHelperProcess: HandleMessagePortForExtensionHostHelperProcess.handleMessagePortForExtensionHostHelperProcess,
|
|
7
|
+
}
|
|
@@ -138,6 +138,8 @@ export const load = (moduleId) => {
|
|
|
138
138
|
return import('../GetElectronFileResponse/GetElectronFileResponse.ipc.js')
|
|
139
139
|
case ModuleId.HandleRemoteRequest:
|
|
140
140
|
return import('../HandleRemoteRequest/HandleRemoteRequest.ipc.js')
|
|
141
|
+
case ModuleId.HandleMessagePortForExtensionHostHelperProcess:
|
|
142
|
+
return import('../HandleMessagePortForExtensionHostHelperProcess/HandleMessagePortForExtensionHostHelperProcess.ipc.js')
|
|
141
143
|
default:
|
|
142
144
|
throw new Error(`module ${moduleId} not found`)
|
|
143
145
|
}
|
|
@@ -293,6 +293,8 @@ export const getModuleId = (commandId) => {
|
|
|
293
293
|
return ModuleId.GetElectronFileResponse
|
|
294
294
|
case 'HandleRemoteRequest.handleRemoteRequest':
|
|
295
295
|
return ModuleId.HandleRemoteRequest
|
|
296
|
+
case 'HandleMessagePortForExtensionHostHelperProcess.handleMessagePortForExtensionHostHelperProcess':
|
|
297
|
+
return ModuleId.HandleMessagePortForExtensionHostHelperProcess
|
|
296
298
|
default:
|
|
297
299
|
throw new CommandNotFoundError(commandId)
|
|
298
300
|
}
|
|
@@ -61,11 +61,11 @@ export const getSetupName = () => {
|
|
|
61
61
|
return 'Lvce-Setup'
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export const version = '0.22.
|
|
64
|
+
export const version = '0.22.1'
|
|
65
65
|
|
|
66
|
-
export const commit = '
|
|
66
|
+
export const commit = 'a466fc1'
|
|
67
67
|
|
|
68
|
-
export const date = '2024-01-
|
|
68
|
+
export const date = '2024-01-04T17:28:33.000Z'
|
|
69
69
|
|
|
70
70
|
export const getVersion = () => {
|
|
71
71
|
return version
|
package/src/parts/Git/Git.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export const id = 'git'
|
|
2
|
-
|
|
3
|
-
export const label = 'Git'
|
|
4
|
-
|
|
5
|
-
export const acceptInputCommand = 'git.commit'
|
|
6
|
-
|
|
7
|
-
const RE_ONLY_WHITESPACE = /^\s+$/
|
|
8
|
-
|
|
9
|
-
export const validateInput = (text) => {
|
|
10
|
-
if (RE_ONLY_WHITESPACE.test(text)) {
|
|
11
|
-
return {
|
|
12
|
-
message: 'Current commit message only contains whitespace characters',
|
|
13
|
-
type: 'warning',
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return undefined
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const vscode = {}
|
|
20
|
-
|
|
21
|
-
export const activate = () => {
|
|
22
|
-
const sourceControlProvider = vscode.createSourceControlProvider({
|
|
23
|
-
providerId: 'git',
|
|
24
|
-
label: 'Git',
|
|
25
|
-
acceptInput(text) {},
|
|
26
|
-
validateInput,
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const mergeGroup = vscode.createSourceControlResourceGroup({
|
|
30
|
-
providerId: 'git',
|
|
31
|
-
groupId: 'merge',
|
|
32
|
-
label: 'Merge Changes',
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
const indexGroup = vscode.createSourceControlResourceGroup({
|
|
36
|
-
providerId: 'git',
|
|
37
|
-
groupId: 'index',
|
|
38
|
-
label: 'Staged Changes',
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
const workingTreeGroup = vscode.createSourceControlResourceGroup({
|
|
42
|
-
providerId: 'git',
|
|
43
|
-
groupId: 'workingTree',
|
|
44
|
-
label: 'Untracked Changes',
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
const untrackedGroup = vscode.createSourceControlResourceGroup({
|
|
48
|
-
providerId: 'git',
|
|
49
|
-
groupId: 'untracked',
|
|
50
|
-
label: 'Untracked Changes',
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
sourceControlProvider.setCount(111)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export const deactivate = () => {
|
|
57
|
-
vscode.unregisterSourceControlProvider('git')
|
|
58
|
-
}
|