@lvce-editor/shared-process 0.0.23 → 0.0.26

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.
@@ -22,27 +22,27 @@
22
22
  {
23
23
  "key": "ctrl+ArrowRight",
24
24
  "command": "Editor.cursorWordRight",
25
- "when": "focus.ViewletEditorText"
25
+ "when": "focus.EditorText"
26
26
  },
27
27
  {
28
28
  "key": "ctrl+ArrowLeft",
29
29
  "command": "Editor.cursorWordLeft",
30
- "when": "focus.ViewletEditorText"
30
+ "when": "focus.EditorText"
31
31
  },
32
32
  {
33
33
  "key": "alt+Backspace",
34
34
  "command": "Editor.deleteWordPartLeft",
35
- "when": "focus.ViewletEditorText"
35
+ "when": "focus.EditorText"
36
36
  },
37
37
  {
38
38
  "key": "alt+Delete",
39
39
  "command": "Editor.deleteWordPartRight",
40
- "when": "focus.ViewletEditorText"
40
+ "when": "focus.EditorText"
41
41
  },
42
42
  {
43
43
  "key": "ctrl+Backspace",
44
44
  "command": "Editor.deleteWordLeft",
45
- "when": "focus.ViewletEditorText"
45
+ "when": "focus.EditorText"
46
46
  },
47
47
  {
48
48
  "key": "Enter",
@@ -57,67 +57,67 @@
57
57
  {
58
58
  "key": "ctrl+Delete",
59
59
  "command": "Editor.deleteWordRight",
60
- "when": "focus.ViewletEditorText"
60
+ "when": "focus.EditorText"
61
61
  },
62
62
  {
63
63
  "key": "ctrl+d",
64
64
  "command": "Editor.selectNextOccurrence",
65
- "when": "focus.ViewletEditorText"
65
+ "when": "focus.EditorText"
66
66
  },
67
67
  {
68
68
  "key": "Tab",
69
69
  "command": "Editor.handleTab",
70
- "when": "focus.ViewletEditorText"
70
+ "when": "focus.EditorText"
71
71
  },
72
72
  {
73
73
  "key": "shift+Tab",
74
74
  "command": "Editor.unindent",
75
- "when": "focus.ViewletEditorText"
75
+ "when": "focus.EditorText"
76
76
  },
77
77
  {
78
78
  "key": "ctrl+[",
79
79
  "command": "Editor.indentLess",
80
- "when": "focus.ViewletEditorText"
80
+ "when": "focus.EditorText"
81
81
  },
82
82
  {
83
83
  "key": "ctrl+]",
84
84
  "command": "Editor.indentMore",
85
- "when": "focus.ViewletEditorText"
85
+ "when": "focus.EditorText"
86
86
  },
87
87
  {
88
88
  "key": "shift+ArrowLeft",
89
89
  "command": "Editor.selectCharacterLeft",
90
- "when": "focus.ViewletEditorText"
90
+ "when": "focus.EditorText"
91
91
  },
92
92
  {
93
93
  "key": "ctrl+shift+ArrowLeft",
94
94
  "command": "Editor.selectWordLeft",
95
- "when": "focus.ViewletEditorText"
95
+ "when": "focus.EditorText"
96
96
  },
97
97
  {
98
98
  "key": "shift+ArrowRight",
99
99
  "command": "Editor.selectCharacterRight",
100
- "when": "focus.ViewletEditorText"
100
+ "when": "focus.EditorText"
101
101
  },
102
102
  {
103
103
  "key": "ctrl+shift+ArrowRight",
104
104
  "command": "Editor.selectWordRight",
105
- "when": "focus.ViewletEditorText"
105
+ "when": "focus.EditorText"
106
106
  },
107
107
  {
108
108
  "key": "ctrl+l",
109
109
  "command": "Editor.selectLine",
110
- "when": "focus.ViewletEditorText"
110
+ "when": "focus.EditorText"
111
111
  },
112
112
  {
113
113
  "key": "ctrl+shift+Backspace",
114
114
  "command": "Editor.deleteAllLeft",
115
- "when": "focus.ViewletEditorText"
115
+ "when": "focus.EditorText"
116
116
  },
117
117
  {
118
118
  "key": "ctrl+shift+Delete",
119
119
  "command": "Editor.deleteAllRight",
120
- "when": "focus.ViewletEditorText"
120
+ "when": "focus.EditorText"
121
121
  },
122
122
  {
123
123
  "key": "ctrl+s",
@@ -143,12 +143,12 @@
143
143
  },
144
144
  {
145
145
  "key": "ctrl+Enter",
146
- "command": "ViewletSourceControl.acceptInput",
146
+ "command": "SourceControl.acceptInput",
147
147
  "when": "focus.sourceControlInput"
148
148
  },
149
149
  {
150
150
  "key": "ctrl+n",
151
- "command": "ViewletExplorer.newFile"
151
+ "command": "Explorer.newFile"
152
152
  },
153
153
  {
154
154
  "key": "ctrl+p",
@@ -236,128 +236,128 @@
236
236
  },
237
237
  {
238
238
  "key": "ArrowRight",
239
- "command": "ViewletExplorer.handleArrowRight",
240
- "when": "focus.ViewletExplorer"
239
+ "command": "Explorer.handleArrowRight",
240
+ "when": "focus.Explorer"
241
241
  },
242
242
  {
243
243
  "key": "ArrowLeft",
244
- "command": "ViewletExplorer.handleArrowLeft",
245
- "when": "focus.ViewletExplorer"
244
+ "command": "Explorer.handleArrowLeft",
245
+ "when": "focus.Explorer"
246
246
  },
247
247
  {
248
248
  "key": "Home",
249
- "command": "ViewletExplorer.focusFirst",
250
- "when": "focus.ViewletExplorer"
249
+ "command": "Explorer.focusFirst",
250
+ "when": "focus.Explorer"
251
251
  },
252
252
  {
253
253
  "key": "End",
254
- "command": "ViewletExplorer.focusLast",
255
- "when": "focus.ViewletExplorer"
254
+ "command": "Explorer.focusLast",
255
+ "when": "focus.Explorer"
256
256
  },
257
257
  {
258
258
  "key": "ArrowUp",
259
- "command": "ViewletExplorer.focusPrevious",
260
- "when": "focus.ViewletExplorer"
259
+ "command": "Explorer.focusPrevious",
260
+ "when": "focus.Explorer"
261
261
  },
262
262
  {
263
263
  "key": "ArrowDown",
264
- "command": "ViewletExplorer.focusNext",
265
- "when": "focus.ViewletExplorer"
264
+ "command": "Explorer.focusNext",
265
+ "when": "focus.Explorer"
266
266
  },
267
267
  {
268
268
  "key": "shift+*",
269
- "command": "ViewletExplorer.expandAll",
270
- "when": "focus.ViewletExplorer"
269
+ "command": "Explorer.expandAll",
270
+ "when": "focus.Explorer"
271
271
  },
272
272
  {
273
273
  "key": "ctrl+ArrowLeft",
274
- "command": "ViewletExplorer.collapseAll",
275
- "when": "focus.ViewletExplorer"
274
+ "command": "Explorer.collapseAll",
275
+ "when": "focus.Explorer"
276
276
  },
277
277
  {
278
278
  "key": "Home",
279
- "command": "ViewletExtensions.focusFirst",
280
- "when": "focus.viewletExtensions"
279
+ "command": "Extensions.focusFirst",
280
+ "when": "focus.Extensions"
281
281
  },
282
282
  {
283
283
  "key": "End",
284
- "command": "ViewletExtensions.focusLast",
285
- "when": "focus.viewletExtensions"
284
+ "command": "Extensions.focusLast",
285
+ "when": "focus.Extensions"
286
286
  },
287
287
  {
288
288
  "key": "PageUp",
289
- "command": "ViewletExtensions.focusPreviousPage",
290
- "when": "focus.viewletExtensions"
289
+ "command": "Extensions.focusPreviousPage",
290
+ "when": "focus.Extensions"
291
291
  },
292
292
  {
293
293
  "key": "PageDown",
294
- "command": "ViewletExtensions.focusNextPage",
295
- "when": "focus.viewletExtensions"
294
+ "command": "Extensions.focusNextPage",
295
+ "when": "focus.Extensions"
296
296
  },
297
297
  {
298
298
  "key": "ArrowUp",
299
- "command": "ViewletExtensions.focusPrevious",
300
- "when": "focus.viewletExtensions"
299
+ "command": "Extensions.focusPrevious",
300
+ "when": "focus.Extensions"
301
301
  },
302
302
  {
303
303
  "key": "ArrowDown",
304
- "command": "ViewletExtensions.focusNext",
305
- "when": "focus.viewletExtensions"
304
+ "command": "Extensions.focusNext",
305
+ "when": "focus.Extensions"
306
306
  },
307
307
  {
308
308
  "key": "ctrl+Space",
309
- "command": "ViewletExtensions.toggleSuggest",
310
- "when": "focus.viewletExtensions"
309
+ "command": "Extensions.toggleSuggest",
310
+ "when": "focus.Extensions"
311
311
  },
312
312
  {
313
313
  "key": "F2",
314
- "command": "ViewletExplorer.rename",
315
- "when": "focus.ViewletExplorer"
314
+ "command": "Explorer.rename",
315
+ "when": "focus.Explorer"
316
316
  },
317
317
  {
318
318
  "key": "Escape",
319
- "command": "ViewletExplorer.cancelRename",
320
- "when": "focus.viewletExplorerRename"
319
+ "command": "Explorer.cancelRename",
320
+ "when": "focus.ExplorerRename"
321
321
  },
322
322
  {
323
323
  "key": "Enter",
324
- "command": "ViewletExplorer.acceptRename",
325
- "when": "focus.viewletExplorerRename"
324
+ "command": "Explorer.acceptRename",
325
+ "when": "focus.ExplorerRename"
326
326
  },
327
327
  {
328
328
  "key": "Escape",
329
- "command": "ViewletExplorer.cancelNewFile",
330
- "when": "focus.viewletExplorerCreateFile"
329
+ "command": "Explorer.cancelNewFile",
330
+ "when": "focus.ExplorerCreateFile"
331
331
  },
332
332
  {
333
333
  "key": "Enter",
334
- "command": "ViewletExplorer.acceptNewFile",
335
- "when": "focus.viewletExplorerCreateFile"
334
+ "command": "Explorer.acceptNewFile",
335
+ "when": "focus.ExplorerCreateFile"
336
336
  },
337
337
  {
338
338
  "key": "Delete",
339
- "command": "ViewletExplorer.removeDirent",
340
- "when": "focus.ViewletExplorer"
339
+ "command": "Explorer.removeDirent",
340
+ "when": "focus.Explorer"
341
341
  },
342
342
  {
343
343
  "key": "Space",
344
- "command": "ViewletExplorer.handleClickCurrent",
345
- "when": "focus.ViewletExplorer"
344
+ "command": "Explorer.handleClickCurrent",
345
+ "when": "focus.Explorer"
346
346
  },
347
347
  {
348
348
  "key": "Enter",
349
- "command": "ViewletExplorer.handleClickCurrent",
350
- "when": "focus.ViewletExplorer"
349
+ "command": "Explorer.handleClickCurrent",
350
+ "when": "focus.Explorer"
351
351
  },
352
352
  {
353
353
  "key": "Escape",
354
354
  "command": "Editor.cancelSelection",
355
- "when": "focus.ViewletEditorText"
355
+ "when": "focus.EditorText"
356
356
  },
357
357
  {
358
358
  "key": "ctrl+z",
359
359
  "command": "Editor.undo",
360
- "when": "focus.ViewletEditorText"
360
+ "when": "focus.EditorText"
361
361
  },
362
362
  {
363
363
  "key": "ctrl+,",
@@ -366,42 +366,42 @@
366
366
  {
367
367
  "key": "ArrowLeft",
368
368
  "command": "Editor.cursorLeft",
369
- "when": "focus.ViewletEditorText"
369
+ "when": "focus.EditorText"
370
370
  },
371
371
  {
372
372
  "key": "ArrowRight",
373
373
  "command": "Editor.cursorRight",
374
- "when": "focus.ViewletEditorText"
374
+ "when": "focus.EditorText"
375
375
  },
376
376
  {
377
377
  "key": "ArrowUp",
378
378
  "command": "Editor.cursorUp",
379
- "when": "focus.ViewletEditorText"
379
+ "when": "focus.EditorText"
380
380
  },
381
381
  {
382
382
  "key": "ArrowDown",
383
383
  "command": "Editor.cursorDown",
384
- "when": "focus.ViewletEditorText"
384
+ "when": "focus.EditorText"
385
385
  },
386
386
  {
387
387
  "key": "Backspace",
388
388
  "command": "Editor.deleteLeft",
389
- "when": "focus.ViewletEditorText"
389
+ "when": "focus.EditorText"
390
390
  },
391
391
  {
392
392
  "key": "Delete",
393
393
  "command": "Editor.deleteRight",
394
- "when": "focus.ViewletEditorText"
394
+ "when": "focus.EditorText"
395
395
  },
396
396
  {
397
397
  "key": "Enter",
398
398
  "command": "Editor.insertLineBreak",
399
- "when": "focus.ViewletEditorText"
399
+ "when": "focus.EditorText"
400
400
  },
401
401
  {
402
402
  "key": "ctrl+shift+d",
403
403
  "command": "Editor.copyLineDown",
404
- "when": "focus.ViewletEditorText"
404
+ "when": "focus.EditorText"
405
405
  },
406
406
  {
407
407
  "key": "ctrl+shift+d",
@@ -411,37 +411,37 @@
411
411
  {
412
412
  "key": "ctrl+shift+ArrowDown",
413
413
  "command": "Editor.moveLineDown",
414
- "when": "focus.ViewletEditorText"
414
+ "when": "focus.EditorText"
415
415
  },
416
416
  {
417
417
  "key": "ctrl+shift+ArrowUp",
418
418
  "command": "Editor.moveLineUp",
419
- "when": "focus.ViewletEditorText"
419
+ "when": "focus.EditorText"
420
420
  },
421
421
  {
422
422
  "key": "ctrl+Space",
423
423
  "command": "Editor.openCompletion",
424
- "when": "focus.ViewletEditorText"
424
+ "when": "focus.EditorText"
425
425
  },
426
426
  {
427
427
  "key": "F2",
428
428
  "command": "EditorRename.open",
429
- "when": "focus.ViewletEditorText"
429
+ "when": "focus.EditorText"
430
430
  },
431
431
  {
432
432
  "key": "Home",
433
433
  "command": "Editor.cursorHome",
434
- "when": "focus.ViewletEditorText"
434
+ "when": "focus.EditorText"
435
435
  },
436
436
  {
437
437
  "key": "End",
438
438
  "command": "Editor.cursorEnd",
439
- "when": "focus.ViewletEditorText"
439
+ "when": "focus.EditorText"
440
440
  },
441
441
  {
442
442
  "key": "ctrl+/",
443
443
  "command": "Editor.toggleComment",
444
- "when": "focus.ViewletEditorText"
444
+ "when": "focus.EditorText"
445
445
  },
446
446
  {
447
447
  "key": "ArrowDown",
@@ -496,22 +496,22 @@
496
496
  {
497
497
  "key": "ctrl+c",
498
498
  "command": "Editor.copy",
499
- "when": "focus.ViewletEditorText"
499
+ "when": "focus.EditorText"
500
500
  },
501
501
  {
502
502
  "key": "ctrl+a",
503
503
  "command": "Editor.selectAll",
504
- "when": "focus.ViewletEditorText"
504
+ "when": "focus.EditorText"
505
505
  },
506
506
  {
507
507
  "key": "alt+ArrowLeft",
508
508
  "command": "Editor.cursorWordPartLeft",
509
- "when": "focus.ViewletEditorText"
509
+ "when": "focus.EditorText"
510
510
  },
511
511
  {
512
512
  "key": "alt+ArrowRight",
513
513
  "command": "Editor.cursorWordPartRight",
514
- "when": "focus.ViewletEditorText"
514
+ "when": "focus.EditorText"
515
515
  },
516
516
  {
517
517
  "key": "ctrl+w",
@@ -533,7 +533,7 @@
533
533
  {
534
534
  "key": "alt+F3",
535
535
  "command": "Editor.selectAllOccurrences",
536
- "when": "focus.ViewletEditorText"
536
+ "when": "focus.EditorText"
537
537
  },
538
538
  {
539
539
  "key": "ctrl+g",
@@ -559,13 +559,13 @@
559
559
  },
560
560
  {
561
561
  "key": "ctrl+v",
562
- "command": "ViewletExplorer.handlePaste",
563
- "when": "focus.ViewletExplorer"
562
+ "command": "Explorer.handlePaste",
563
+ "when": "focus.Explorer"
564
564
  },
565
565
  {
566
566
  "key": "ctrl+c",
567
- "command": "ViewletExplorer.handleCopy",
568
- "when": "focus.ViewletExplorer"
567
+ "command": "Explorer.handleCopy",
568
+ "when": "focus.Explorer"
569
569
  },
570
570
  {
571
571
  "key": "ArrowDown",
@@ -623,27 +623,27 @@
623
623
  },
624
624
  {
625
625
  "key": "ArrowDown",
626
- "command": "ViewletLocations.focusNext",
626
+ "command": "Locations.focusNext",
627
627
  "when": "focus.locationList"
628
628
  },
629
629
  {
630
630
  "key": "ArrowUp",
631
- "command": "ViewletLocations.focusPrevious",
631
+ "command": "Locations.focusPrevious",
632
632
  "when": "focus.locationList"
633
633
  },
634
634
  {
635
635
  "key": "Home",
636
- "command": "ViewletLocations.focusFirst",
636
+ "command": "Locations.focusFirst",
637
637
  "when": "focus.locationList"
638
638
  },
639
639
  {
640
640
  "key": "End",
641
- "command": "ViewletLocations.focusLast",
641
+ "command": "Locations.focusLast",
642
642
  "when": "focus.locationList"
643
643
  },
644
644
  {
645
645
  "key": "Enter",
646
- "command": "ViewletLocations.selectCurrent",
646
+ "command": "Locations.selectCurrent",
647
647
  "when": "focus.locationList"
648
648
  }
649
649
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.0.23",
3
+ "version": "0.0.26",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -31,8 +31,8 @@
31
31
  "verror": "^1.10.1",
32
32
  "ws": "^8.8.0",
33
33
  "xdg-basedir": "^5.1.0",
34
- "@lvce-editor/pty-host": "0.0.23",
35
- "@lvce-editor/extension-host": "0.0.23"
34
+ "@lvce-editor/pty-host": "0.0.26",
35
+ "@lvce-editor/extension-host": "0.0.26"
36
36
  },
37
37
  "optionalDependencies": {
38
38
  "electron-clipboard-ex": "^1.3.3",
@@ -27,7 +27,7 @@ export const handleError = (error) => {
27
27
  const prettyError = preparePrettyError(error)
28
28
  Socket.send({
29
29
  jsonrpc: '2.0',
30
- method: /* Dialog.showErrorDialogWithOptions */ 1494,
30
+ method: /* Dialog.showErrorDialogWithOptions */ 'Dialog.showMessage',
31
31
  params: [
32
32
  {
33
33
  message: prettyError.message,
@@ -10,6 +10,10 @@ import * as Platform from '../Platform/Platform.js'
10
10
  import * as Queue from '../Queue/Queue.js'
11
11
  import path from 'node:path'
12
12
 
13
+ const isLanguageBasics = (extension) => {
14
+ return extension.id.includes('language-basics')
15
+ }
16
+
13
17
  export const state = {
14
18
  async getExtensions() {
15
19
  // TODO only read from env once
@@ -17,7 +21,7 @@ export const state = {
17
21
  if (process.env.ONLY_EXTENSION) {
18
22
  const absolutePath = path.resolve(process.env.ONLY_EXTENSION)
19
23
  const onlyExtension = await getExtensionManifests([absolutePath])
20
- return [...builtinExtensions, ...onlyExtension]
24
+ return [...builtinExtensions.filter(isLanguageBasics), ...onlyExtension]
21
25
  }
22
26
  const installedExtensions = await getInstalledExtensions()
23
27
  return [...builtinExtensions, ...installedExtensions]
@@ -46,10 +46,8 @@ const handleMessageFromParentProcess = async (message, handle) => {
46
46
  } else if (message.result) {
47
47
  Callback.resolve(message.id, message.result)
48
48
  } else if (message.method) {
49
- console.log({ message })
50
49
  if (message.id) {
51
50
  try {
52
- console.log('INISDE HERE')
53
51
  const result = requiresSocket(message.method)
54
52
  ? await Command.invoke(message.method, handle, ...message.params)
55
53
  : await Command.invoke(message.method, ...message.params)
@@ -179,7 +177,6 @@ const handleMessageFromParentProcessElectron = async (message) => {
179
177
  electronInitialize(message)
180
178
  return
181
179
  }
182
- console.log({ message })
183
180
  if ('result' in message) {
184
181
  Callback.resolve(message.id, message.result)
185
182
  return