@lvce-editor/shared-process 0.0.33 → 0.0.36
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 +8 -0
- package/config/defaultKeyBindings.json +8 -0
- package/package.json +3 -3
- package/src/parts/Command/Command.js +8 -7
- package/src/parts/Electron/Electron.js +3 -2
- package/src/parts/FileSystem/FileSystem.ipc.js +1 -0
- package/src/parts/FileSystem/FileSystem.js +5 -1
- package/src/parts/Platform/Platform.ipc.js +11 -9
- package/src/parts/Platform/Platform.js +8 -0
|
@@ -280,6 +280,14 @@
|
|
|
280
280
|
"id": "Editor.toggleComment",
|
|
281
281
|
"label": "Editor: Toggle Comment"
|
|
282
282
|
},
|
|
283
|
+
{
|
|
284
|
+
"id": "Editor.selectUp",
|
|
285
|
+
"label": "Editor: Select Up"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "Editor.selectDown",
|
|
289
|
+
"label": "Editor: Select Down"
|
|
290
|
+
},
|
|
283
291
|
{
|
|
284
292
|
"id": "Editor.toggleBlockComment",
|
|
285
293
|
"label": "Editor: Toggle Block Comment"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"verror": "^1.10.1",
|
|
39
39
|
"ws": "^8.8.1",
|
|
40
40
|
"xdg-basedir": "^5.1.0",
|
|
41
|
-
"@lvce-editor/pty-host": "0.0.
|
|
42
|
-
"@lvce-editor/extension-host": "0.0.
|
|
41
|
+
"@lvce-editor/pty-host": "0.0.36",
|
|
42
|
+
"@lvce-editor/extension-host": "0.0.36"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
45
|
"electron-clipboard-ex": "^1.3.3",
|
|
@@ -88,17 +88,18 @@ const getOrLoadModule = (moduleId) => {
|
|
|
88
88
|
|
|
89
89
|
const getModuleId = (commandId) => {
|
|
90
90
|
switch (commandId) {
|
|
91
|
-
case 'FileSystem.
|
|
92
|
-
case 'FileSystem.
|
|
93
|
-
case 'FileSystem.readDirWithFileTypes':
|
|
94
|
-
case 'FileSystem.remove':
|
|
95
|
-
case 'FileSystem.mkdir':
|
|
91
|
+
case 'FileSystem.chmod':
|
|
92
|
+
case 'FileSystem.copy':
|
|
96
93
|
case 'FileSystem.createFile':
|
|
97
94
|
case 'FileSystem.createFolder':
|
|
98
|
-
case 'FileSystem.rename':
|
|
99
95
|
case 'FileSystem.ensureFile':
|
|
100
|
-
case 'FileSystem.copy':
|
|
101
96
|
case 'FileSystem.getPathSeparator':
|
|
97
|
+
case 'FileSystem.mkdir':
|
|
98
|
+
case 'FileSystem.readDirWithFileTypes':
|
|
99
|
+
case 'FileSystem.readFile':
|
|
100
|
+
case 'FileSystem.remove':
|
|
101
|
+
case 'FileSystem.rename':
|
|
102
|
+
case 'FileSystem.writeFile':
|
|
102
103
|
return MODULE_FILE_SYSTEM
|
|
103
104
|
case 'Workspace.resolveRoot':
|
|
104
105
|
case 'Workspace.getHomeDir':
|
|
@@ -65,9 +65,10 @@ export const about = async () => {
|
|
|
65
65
|
await invoke(/* About.open */ 'About.open')
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
export const showOpenDialog = async () => {
|
|
68
|
+
export const showOpenDialog = async (title) => {
|
|
69
69
|
const result = await invoke(
|
|
70
|
-
/* Dialog.showOpenDialog */ 'Dialog.showOpenDialog'
|
|
70
|
+
/* Dialog.showOpenDialog */ 'Dialog.showOpenDialog',
|
|
71
|
+
/* title */ title
|
|
71
72
|
)
|
|
72
73
|
return result
|
|
73
74
|
}
|
|
@@ -15,6 +15,7 @@ const fileSystemWatch = (socket, id, path) => {
|
|
|
15
15
|
|
|
16
16
|
// TODO separate ipc from code like in renderer worker
|
|
17
17
|
export const Commands = {
|
|
18
|
+
'FileSystem.chmod': FileSystem.chmod,
|
|
18
19
|
'FileSystem.copy': FileSystem.copy,
|
|
19
20
|
'FileSystem.createFile': FileSystem.createFile,
|
|
20
21
|
'FileSystem.createFolder': FileSystem.createFolder,
|
|
@@ -260,13 +260,17 @@ export const getRealPath = async (path) => {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
+
// TODO handle error
|
|
263
264
|
export const stat = async (path) => {
|
|
264
265
|
const stats = await fs.stat(path)
|
|
265
266
|
const type = getType(stats)
|
|
266
267
|
return type
|
|
267
268
|
}
|
|
268
269
|
|
|
269
|
-
|
|
270
|
+
export const chmod = async (path, permissions) => {
|
|
271
|
+
await fs.chmod(path, permissions)
|
|
272
|
+
}
|
|
273
|
+
|
|
270
274
|
// export const unwatch = (id) => {
|
|
271
275
|
// state.watchers[id].close()
|
|
272
276
|
// delete state.watchers[id]
|
|
@@ -2,19 +2,21 @@ import * as Platform from '../Platform/Platform.js'
|
|
|
2
2
|
|
|
3
3
|
// prettier-ignore
|
|
4
4
|
export const Commands = {
|
|
5
|
-
'Platform.getConfigDir': Platform.getConfigDir,
|
|
6
5
|
'Platform.getAppDir': Platform.getAppDir,
|
|
7
|
-
'Platform.getHomeDir': Platform.getHomeDir,
|
|
8
|
-
'Platform.getDataDir': Platform.getDataDir,
|
|
9
|
-
'Platform.getExtensionsPath': Platform.getExtensionsPath,
|
|
10
6
|
'Platform.getBuiltinExtensionsPath': Platform.getBuiltinExtensionsPath,
|
|
11
|
-
'Platform.getDisabledExtensionsPath': Platform.getDisabledExtensionsPath,
|
|
12
7
|
'Platform.getCachedExtensionsPath': Platform.getCachedExtensionsPath,
|
|
13
|
-
'Platform.
|
|
8
|
+
'Platform.getCacheDir': Platform.getCacheDir,
|
|
9
|
+
'Platform.getConfigDir': Platform.getConfigDir,
|
|
10
|
+
'Platform.getDataDir': Platform.getDataDir,
|
|
11
|
+
'Platform.getDisabledExtensionsPath': Platform.getDisabledExtensionsPath,
|
|
12
|
+
'Platform.getExtensionsPath': Platform.getExtensionsPath,
|
|
13
|
+
'Platform.getHomeDir': Platform.getHomeDir,
|
|
14
14
|
'Platform.getLogsDir': Platform.getLogsDir,
|
|
15
|
-
'Platform.
|
|
15
|
+
'Platform.getMarketplaceUrl': Platform.getMarketplaceUrl,
|
|
16
|
+
'Platform.getNodePath': Platform.getNodePath,
|
|
16
17
|
'Platform.getRecentlyOpenedPath': Platform.getRecentlyOpenedPath,
|
|
17
|
-
'Platform.getCacheDir': Platform.getCacheDir,
|
|
18
|
-
'Platform.setEnvironmentVariables': Platform.setEnvironmentVariables,
|
|
19
18
|
'Platform.getTestPath': Platform.getTestPath,
|
|
19
|
+
'Platform.getTmpDir': Platform.getTmpDir,
|
|
20
|
+
'Platform.getUserSettingsPath': Platform.getUserSettingsPath,
|
|
21
|
+
'Platform.setEnvironmentVariables': Platform.setEnvironmentVariables,
|
|
20
22
|
}
|