@lvce-editor/shared-process 0.16.4 → 0.16.6
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/builtinCommands.json +12 -0
- package/extensions/builtin.language-basics-cpp/src/tokenizeCpp.js +4 -0
- package/extensions/builtin.language-basics-rust/LICENSE +21 -0
- package/extensions/builtin.language-basics-rust/languageConfiguration.json +17 -0
- package/extensions/builtin.theme-slime/color-theme.json +1 -0
- package/package.json +4 -4
- package/src/parts/Developer/Developer.ipc.js +2 -2
- package/src/parts/ExtensionHost/ExtensionHost.ipc.js +2 -2
- package/src/parts/Module/Module.js +18 -18
- package/src/parts/ModuleMap/ModuleMap.js +20 -24
- package/src/parts/Platform/Platform.ipc.js +1 -1
- package/src/parts/Platform/Platform.js +3 -3
- package/src/parts/Process/Process.ipc.js +2 -2
|
@@ -385,6 +385,18 @@
|
|
|
385
385
|
"id": "Developer.openProcessExplorer",
|
|
386
386
|
"label": "Developer: Open Process Explorer"
|
|
387
387
|
},
|
|
388
|
+
{
|
|
389
|
+
"id": "Developer.openStorageOverview",
|
|
390
|
+
"label": "Developer: Open Storage Overview"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"id": "Developer.openBrowserViewOverview",
|
|
394
|
+
"label": "Developer: Open Browser View Overview"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"id": "Developer.openScreenCastView",
|
|
398
|
+
"label": "Developer: Open ScreenCast View"
|
|
399
|
+
},
|
|
388
400
|
{
|
|
389
401
|
"id": "Explorer.collapseAll",
|
|
390
402
|
"label": "Explorer: Collapse All"
|
|
@@ -114,6 +114,7 @@ const RE_INCLUDE_WITH_QUOTES = /^"([^"]*)"/
|
|
|
114
114
|
const RE_INCLUDE_WITH_ANGLE_BRACKETS = /^<[^>]*>/
|
|
115
115
|
const RE_TYPE = /^(?:size_t)\b/
|
|
116
116
|
const RE_MACRO = /^#[a-z]+/
|
|
117
|
+
const RE_FUNCTION_CALL_NAME = /^[\w]+(?=\s*(\())/
|
|
117
118
|
|
|
118
119
|
export const initialLineState = {
|
|
119
120
|
state: State.TopLevelContent,
|
|
@@ -183,6 +184,9 @@ export const tokenizeLine = (line, lineState) => {
|
|
|
183
184
|
} else if ((next = part.match(RE_TYPE))) {
|
|
184
185
|
token = TokenType.Type
|
|
185
186
|
state = State.TopLevelContent
|
|
187
|
+
} else if ((next = part.match(RE_FUNCTION_CALL_NAME))) {
|
|
188
|
+
token = TokenType.FunctionName
|
|
189
|
+
state = State.TopLevelContent
|
|
186
190
|
} else if ((next = part.match(RE_VARIABLE_NAME))) {
|
|
187
191
|
token = TokenType.VariableName
|
|
188
192
|
state = State.TopLevelContent
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022-present, Lvce Editor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"comments": {
|
|
3
|
+
"blockComment": ["/*", "*/"]
|
|
4
|
+
},
|
|
5
|
+
"brackets": [
|
|
6
|
+
["{", "}"],
|
|
7
|
+
["[", "]"],
|
|
8
|
+
["(", ")"]
|
|
9
|
+
],
|
|
10
|
+
"autoClosingPairs": [
|
|
11
|
+
{ "open": "{", "close": "}", "notIn": ["string", "comment"] },
|
|
12
|
+
{ "open": "[", "close": "]", "notIn": ["string", "comment"] },
|
|
13
|
+
{ "open": "(", "close": ")", "notIn": ["string", "comment"] },
|
|
14
|
+
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
|
|
15
|
+
{ "open": "'", "close": "'", "notIn": ["string", "comment"] }
|
|
16
|
+
]
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.6",
|
|
4
4
|
"description": "Utility package for @lvce-editor/server",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@babel/code-frame": "^7.22.5",
|
|
20
|
-
"@lvce-editor/extension-host": "0.16.
|
|
21
|
-
"@lvce-editor/extension-host-helper-process": "0.16.
|
|
22
|
-
"@lvce-editor/pty-host": "0.16.
|
|
20
|
+
"@lvce-editor/extension-host": "0.16.6",
|
|
21
|
+
"@lvce-editor/extension-host-helper-process": "0.16.6",
|
|
22
|
+
"@lvce-editor/pty-host": "0.16.6",
|
|
23
23
|
"debug": "^4.3.4",
|
|
24
24
|
"execa": "^7.1.1",
|
|
25
25
|
"exit-hook": "^3.2.0",
|
|
@@ -7,9 +7,9 @@ export const name = 'Developer'
|
|
|
7
7
|
|
|
8
8
|
export const Commands = {
|
|
9
9
|
allocateMemory: Developer.allocateMemory,
|
|
10
|
-
createProfile: CpuProfile.createProfile,
|
|
11
|
-
createHeapSnapshot: HeapSnapshot.createHeapSnapshot,
|
|
12
10
|
crashSharedProcess: Crash.crashSharedProcess,
|
|
11
|
+
createHeapSnapshot: HeapSnapshot.createHeapSnapshot,
|
|
12
|
+
createProfile: CpuProfile.createProfile,
|
|
13
13
|
getNodeStartupTime: Developer.getNodeStartupTiming,
|
|
14
14
|
getNodeStartupTiming: Developer.getNodeStartupTiming,
|
|
15
15
|
sharedProcessMemoryUsage: Developer.sharedProcessMemoryUsage,
|
|
@@ -6,13 +6,13 @@ import * as ExtensionHostKeyBindings from './ExtensionHostKeyBindings.js'
|
|
|
6
6
|
export const Commands = {
|
|
7
7
|
|
|
8
8
|
'ExtensionHost.dispose': ExtensionHost.dispose,
|
|
9
|
-
// 'ExtensionHost.getCommands': ExtensionHostCommand.getCommandsIpc,
|
|
10
9
|
'ExtensionHost.send': ExtensionHost.send,
|
|
11
10
|
'ExtensionHost.start': ExtensionHost.start,
|
|
11
|
+
'ExtensionHostKeyBindings.getKeyBindings': ExtensionHostKeyBindings.getKeyBindings,
|
|
12
|
+
// 'ExtensionHost.getCommands': ExtensionHostCommand.getCommandsIpc,
|
|
12
13
|
// 'ExtensionHostCompletion.execute': ExtensionHost.forward,
|
|
13
14
|
// 'ExtensionHostExtension.activate': ExtensionHost.forward,
|
|
14
15
|
// 'ExtensionHostExtension.disable': ExtensionHost.forward,
|
|
15
|
-
'ExtensionHostKeyBindings.getKeyBindings': ExtensionHostKeyBindings.getKeyBindings,
|
|
16
16
|
// 'ExtensionHostSemanticTokens.executeSemanticTokenProvider': ExtensionHost.forward,
|
|
17
17
|
// 'ExtensionHostTextDocument.setLanguageId': ExtensionHost.forward,
|
|
18
18
|
// 'ExtensionHostTextDocument.syncFull': ExtensionHost.forward,
|
|
@@ -20,20 +20,34 @@ export const load = (moduleId) => {
|
|
|
20
20
|
return import('../Developer/Developer.ipc.js')
|
|
21
21
|
case ModuleId.Download:
|
|
22
22
|
return import('../Download/Download.ipc.js')
|
|
23
|
-
case ModuleId.ExtensionHost:
|
|
24
|
-
return import('../ExtensionHost/ExtensionHost.ipc.js')
|
|
25
23
|
case ModuleId.ElectronInitialize:
|
|
26
24
|
return import('../ElectronInitialize/ElectronInitialize.ipc.js')
|
|
25
|
+
case ModuleId.ExtensionHost:
|
|
26
|
+
return import('../ExtensionHost/ExtensionHost.ipc.js')
|
|
27
27
|
case ModuleId.ExtensionManagement:
|
|
28
28
|
return import('../ExtensionManagement/ExtensionManagement.ipc.js')
|
|
29
29
|
case ModuleId.FileSystem:
|
|
30
30
|
return import('../FileSystem/FileSystem.ipc.js')
|
|
31
|
+
case ModuleId.GetTerminalSpawnOptions:
|
|
32
|
+
return import('../GetTerminalSpawnOptions/GetTerminalSpawnOptions.ipc.js')
|
|
31
33
|
case ModuleId.GitLsFiles:
|
|
32
34
|
return import('../GitLsFiles/GitLsFiles.ipc.js')
|
|
35
|
+
case ModuleId.HandleCliArgs:
|
|
36
|
+
return import('../HandleCliArgs/HandleCliArgs.ipc.js')
|
|
37
|
+
case ModuleId.HandleElectronMessagePort:
|
|
38
|
+
return import('../HandleElectronMessagePort/HandleElectronMessagePort.ipc.js')
|
|
39
|
+
case ModuleId.HandleNodeMessagePort:
|
|
40
|
+
return import('../HandleNodeMessagePort/HandleNodeMessagePort.ipc.js')
|
|
41
|
+
case ModuleId.HandleWebSocket:
|
|
42
|
+
return import('../HandleWebSocket/HandleWebSocket.ipc.js')
|
|
43
|
+
case ModuleId.IncrementalTextSearch:
|
|
44
|
+
return import('../IncrementalTextSearch/IncremetalTextSearch.ipc.js')
|
|
33
45
|
case ModuleId.InstallExtension:
|
|
34
46
|
return import('../InstallExtension/InstallExtension.ipc.js')
|
|
35
47
|
case ModuleId.IsAutoUpdateSupported:
|
|
36
48
|
return import('../IsAutoUpdateSupported/IsAutoUpdateSupported.ipc.js')
|
|
49
|
+
case ModuleId.ListProcessesWithMemoryUsage:
|
|
50
|
+
return import('../ListProcessesWithMemoryUsage/ListProcessesWithMemoryUsage.ipc.js')
|
|
37
51
|
case ModuleId.OpenNativeFolder:
|
|
38
52
|
return import('../OpenNativeFolder/OpenNativeFolder.ipc.js')
|
|
39
53
|
case ModuleId.OutputChannel:
|
|
@@ -44,6 +58,8 @@ export const load = (moduleId) => {
|
|
|
44
58
|
return import('../Preferences/Preferences.ipc.js')
|
|
45
59
|
case ModuleId.Process:
|
|
46
60
|
return import('../Process/Process.ipc.js')
|
|
61
|
+
case ModuleId.RebuildNodePty:
|
|
62
|
+
return import('../RebuildNodePty/RebuildNodePty.ipc.js')
|
|
47
63
|
case ModuleId.RecentlyOpened:
|
|
48
64
|
return import('../RecentlyOpened/RecentlyOpened.ipc.js')
|
|
49
65
|
case ModuleId.SearchFile:
|
|
@@ -58,22 +74,6 @@ export const load = (moduleId) => {
|
|
|
58
74
|
return import('../WebSocketServer/WebSocketServer.ipc.js')
|
|
59
75
|
case ModuleId.Workspace:
|
|
60
76
|
return import('../Workspace/Workspace.ipc.js')
|
|
61
|
-
case ModuleId.RebuildNodePty:
|
|
62
|
-
return import('../RebuildNodePty/RebuildNodePty.ipc.js')
|
|
63
|
-
case ModuleId.HandleWebSocket:
|
|
64
|
-
return import('../HandleWebSocket/HandleWebSocket.ipc.js')
|
|
65
|
-
case ModuleId.HandleElectronMessagePort:
|
|
66
|
-
return import('../HandleElectronMessagePort/HandleElectronMessagePort.ipc.js')
|
|
67
|
-
case ModuleId.HandleNodeMessagePort:
|
|
68
|
-
return import('../HandleNodeMessagePort/HandleNodeMessagePort.ipc.js')
|
|
69
|
-
case ModuleId.GetTerminalSpawnOptions:
|
|
70
|
-
return import('../GetTerminalSpawnOptions/GetTerminalSpawnOptions.ipc.js')
|
|
71
|
-
case ModuleId.HandleCliArgs:
|
|
72
|
-
return import('../HandleCliArgs/HandleCliArgs.ipc.js')
|
|
73
|
-
case ModuleId.ListProcessesWithMemoryUsage:
|
|
74
|
-
return import('../ListProcessesWithMemoryUsage/ListProcessesWithMemoryUsage.ipc.js')
|
|
75
|
-
case ModuleId.IncrementalTextSearch:
|
|
76
|
-
return import('../IncrementalTextSearch/IncremetalTextSearch.ipc.js')
|
|
77
77
|
default:
|
|
78
78
|
throw new Error(`module ${moduleId} not found`)
|
|
79
79
|
}
|
|
@@ -108,20 +108,28 @@ export const getModuleId = (commandId) => {
|
|
|
108
108
|
case 'FileSystem.rename':
|
|
109
109
|
case 'FileSystem.writeFile':
|
|
110
110
|
return ModuleId.FileSystem
|
|
111
|
+
case 'GetTerminalSpawnOptions.getTerminalSpawnOptions':
|
|
112
|
+
return ModuleId.GetTerminalSpawnOptions
|
|
111
113
|
case 'GitLsFiles.gitLsFiles':
|
|
112
114
|
case 'GitLsFiles.gitLsFilesHash':
|
|
113
115
|
case 'GitLsFiles.resolveGit':
|
|
114
116
|
return ModuleId.GitLsFiles
|
|
115
|
-
case '
|
|
116
|
-
return ModuleId.
|
|
117
|
+
case 'HandleCliArgs.handleCliArgs':
|
|
118
|
+
return ModuleId.HandleCliArgs
|
|
117
119
|
case 'HandleElectronMessagePort.handleElectronMessagePort':
|
|
118
120
|
return ModuleId.HandleElectronMessagePort
|
|
119
121
|
case 'HandleNodeMessagePort.handleNodeMessagePort':
|
|
120
122
|
return ModuleId.HandleNodeMessagePort
|
|
123
|
+
case 'HandleWebSocket.handleWebSocket':
|
|
124
|
+
return ModuleId.HandleWebSocket
|
|
125
|
+
case 'IncrementalTextSearch.start':
|
|
126
|
+
return ModuleId.IncrementalTextSearch
|
|
121
127
|
case 'InstallExtension.installExtension':
|
|
122
128
|
return ModuleId.InstallExtension
|
|
123
129
|
case 'IsAutoUpdateSupported.isAutoUpdateSupported':
|
|
124
130
|
return ModuleId.IsAutoUpdateSupported
|
|
131
|
+
case 'ListProcessesWithMemoryUsage.listProcessesWithMemoryUsage':
|
|
132
|
+
return ModuleId.ListProcessesWithMemoryUsage
|
|
125
133
|
case 'Native.openFolder':
|
|
126
134
|
case 'OpenNativeFolder.openFolder':
|
|
127
135
|
return ModuleId.OpenNativeFolder
|
|
@@ -132,8 +140,10 @@ export const getModuleId = (commandId) => {
|
|
|
132
140
|
case 'Platform.getBuiltinExtensionsPath':
|
|
133
141
|
case 'Platform.getCachedExtensionsPath':
|
|
134
142
|
case 'Platform.getCacheDir':
|
|
143
|
+
case 'Platform.getCommit':
|
|
135
144
|
case 'Platform.getConfigDir':
|
|
136
145
|
case 'Platform.getDataDir':
|
|
146
|
+
case 'Platform.getDate':
|
|
137
147
|
case 'Platform.getDisabledExtensionsPath':
|
|
138
148
|
case 'Platform.getDownloadDir':
|
|
139
149
|
case 'Platform.getExtensionsPath':
|
|
@@ -143,13 +153,18 @@ export const getModuleId = (commandId) => {
|
|
|
143
153
|
case 'Platform.getRecentlyOpenedPath':
|
|
144
154
|
case 'Platform.getTestPath':
|
|
145
155
|
case 'Platform.getUserSettingsPath':
|
|
146
|
-
case 'Platform.setEnvironmentVariables':
|
|
147
|
-
case 'Platform.getCommit':
|
|
148
156
|
case 'Platform.getVersion':
|
|
149
|
-
case 'Platform.
|
|
157
|
+
case 'Platform.setEnvironmentVariables':
|
|
150
158
|
return ModuleId.Platform
|
|
151
159
|
case 'Preferences.getAll':
|
|
152
160
|
return ModuleId.Preferences
|
|
161
|
+
case 'Process.getNodeVersion':
|
|
162
|
+
case 'Process.getPid':
|
|
163
|
+
case 'Process.getV8Version':
|
|
164
|
+
case 'Process.kill':
|
|
165
|
+
return ModuleId.Process
|
|
166
|
+
case 'RebuildNodePty.rebuildNodePty':
|
|
167
|
+
return ModuleId.RebuildNodePty
|
|
153
168
|
case 'RecentlyOpened.addPath':
|
|
154
169
|
return ModuleId.RecentlyOpened
|
|
155
170
|
case 'TextSearch.search':
|
|
@@ -168,25 +183,6 @@ export const getModuleId = (commandId) => {
|
|
|
168
183
|
case 'Workspace.getHomeDir':
|
|
169
184
|
case 'Workspace.resolveRoot':
|
|
170
185
|
return ModuleId.Workspace
|
|
171
|
-
case 'RebuildNodePty.rebuildNodePty':
|
|
172
|
-
return ModuleId.RebuildNodePty
|
|
173
|
-
case 'Process.getPid':
|
|
174
|
-
case 'Process.kill':
|
|
175
|
-
case 'Process.getV8Version':
|
|
176
|
-
case 'Process.getNodeVersion':
|
|
177
|
-
return ModuleId.Process
|
|
178
|
-
case 'HandleNodeMessagePort.handleNodeMessagePort':
|
|
179
|
-
return ModuleId.HandleNodeMessagePort
|
|
180
|
-
case 'HandleElectronMessagePort.handleElectronMessagePort':
|
|
181
|
-
return ModuleId.HandleElectronMessagePort
|
|
182
|
-
case 'GetTerminalSpawnOptions.getTerminalSpawnOptions':
|
|
183
|
-
return ModuleId.GetTerminalSpawnOptions
|
|
184
|
-
case 'HandleCliArgs.handleCliArgs':
|
|
185
|
-
return ModuleId.HandleCliArgs
|
|
186
|
-
case 'ListProcessesWithMemoryUsage.listProcessesWithMemoryUsage':
|
|
187
|
-
return ModuleId.ListProcessesWithMemoryUsage
|
|
188
|
-
case 'IncrementalTextSearch.start':
|
|
189
|
-
return ModuleId.IncrementalTextSearch
|
|
190
186
|
default:
|
|
191
187
|
throw new CommandNotFoundError(commandId)
|
|
192
188
|
}
|
|
@@ -10,6 +10,7 @@ export const Commands = {
|
|
|
10
10
|
getCommit: Platform.getCommit,
|
|
11
11
|
getConfigDir: Platform.getConfigDir,
|
|
12
12
|
getDataDir: Platform.getDataDir,
|
|
13
|
+
getDate: Platform.getDate,
|
|
13
14
|
getDisabledExtensionsPath: Platform.getDisabledExtensionsPath,
|
|
14
15
|
getDownloadDir: Platform.getDownloadDir,
|
|
15
16
|
getExtensionsPath: Platform.getExtensionsPath,
|
|
@@ -23,5 +24,4 @@ export const Commands = {
|
|
|
23
24
|
getUserSettingsPath: Platform.getUserSettingsPath,
|
|
24
25
|
getVersion: Platform.getVersion,
|
|
25
26
|
setEnvironmentVariables: Platform.setEnvironmentVariables,
|
|
26
|
-
getDate: Platform.getDate,
|
|
27
27
|
}
|
|
@@ -165,11 +165,11 @@ export const getSetupName = () => {
|
|
|
165
165
|
return 'Lvce-Setup'
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
export const version = '0.16.
|
|
168
|
+
export const version = '0.16.6'
|
|
169
169
|
|
|
170
|
-
export const commit = '
|
|
170
|
+
export const commit = '68e8dc4'
|
|
171
171
|
|
|
172
|
-
export const date = '2023-07-
|
|
172
|
+
export const date = '2023-07-06T15:36:10.000Z'
|
|
173
173
|
|
|
174
174
|
export const getVersion = () => {
|
|
175
175
|
return version
|
|
@@ -5,8 +5,8 @@ export const name = 'Process'
|
|
|
5
5
|
export const Commands = {
|
|
6
6
|
crash: Process.crash,
|
|
7
7
|
crashAsync: Process.crashAsync,
|
|
8
|
+
getNodeVersion: Process.getNodeVersion,
|
|
8
9
|
getPid: Process.getPid,
|
|
9
|
-
kill: Process.kill,
|
|
10
10
|
getV8Version: Process.getV8Version,
|
|
11
|
-
|
|
11
|
+
kill: Process.kill,
|
|
12
12
|
}
|