@lvce-editor/shared-process 0.22.3 → 0.22.4

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.
@@ -11,6 +11,7 @@
11
11
  "editor.fontLigatures": true,
12
12
  "editor.links": true,
13
13
  "editor.tabSize": 2,
14
+ "editor.hover": false,
14
15
 
15
16
  "editor.autoClosingBrackets": true,
16
17
  "editor.autoClosingQuotes": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.22.3",
3
+ "version": "0.22.4",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -17,12 +17,12 @@
17
17
  "node": ">=18"
18
18
  },
19
19
  "dependencies": {
20
- "@lvce-editor/assert": "^1.1.0",
21
- "@lvce-editor/extension-host-helper-process": "0.22.3",
20
+ "@lvce-editor/assert": "^1.2.0",
21
+ "@lvce-editor/extension-host-helper-process": "0.22.4",
22
22
  "@lvce-editor/json-rpc": "^1.0.0",
23
23
  "@lvce-editor/jsonc-parser": "^1.1.0",
24
24
  "@lvce-editor/pretty-error": "^1.4.0",
25
- "@lvce-editor/pty-host": "0.22.3",
25
+ "@lvce-editor/pty-host": "0.22.4",
26
26
  "@lvce-editor/verror": "^1.1.2",
27
27
  "@lvce-editor/web-socket-server": "^1.1.0",
28
28
  "debug": "^4.3.4",
@@ -0,0 +1,15 @@
1
+ import { VError } from '../VError/VError.js'
2
+
3
+ export const getTypeFromUrl = (url) => {
4
+ if (!url) {
5
+ throw new VError('invalid url')
6
+ }
7
+ const questionMarkIndex = url.indexOf('?')
8
+ if (questionMarkIndex === -1) {
9
+ throw new VError(`missing type parameter`)
10
+ }
11
+ const rest = url.slice(questionMarkIndex)
12
+ const searchParams = new URLSearchParams(rest)
13
+ const type = searchParams.get('type')
14
+ return type
15
+ }
@@ -1,23 +1,18 @@
1
1
  import * as Assert from '../Assert/Assert.js'
2
2
  import * as DestroyWebSocket from '../DestroySocket/DestroySocket.js'
3
3
  import * as HandleWebSocketModule from '../HandleWebSocketModule/HandleWebSocketModule.js'
4
+ import * as GetTypeFromUrl from '../GetTypeFromUrl/GetTypeFromUrl.js'
4
5
  import { VError } from '../VError/VError.js'
5
6
 
6
7
  export const handleWebSocket = async (message, handle) => {
7
8
  try {
8
9
  Assert.object(message)
9
10
  Assert.object(handle)
10
- const { headers } = message
11
- if (!headers) {
12
- throw new VError('missing websocket headers')
13
- }
14
- const protocol = headers['sec-websocket-protocol']
15
- if (!protocol) {
16
- throw new VError('missing sec websocket protocol header')
17
- }
11
+ const { url } = message
12
+ const type = GetTypeFromUrl.getTypeFromUrl(url)
18
13
  handle.pause()
19
- const module = await HandleWebSocketModule.load(protocol)
20
- await module.handleWebSocket(message, handle, protocol)
14
+ const module = await HandleWebSocketModule.load(type)
15
+ await module.handleWebSocket(message, handle, type)
21
16
  } catch (error) {
22
17
  DestroyWebSocket.destroySocket(handle)
23
18
  throw new VError(error, `Failed to connect to websocket`)
@@ -61,11 +61,11 @@ export const getSetupName = () => {
61
61
  return 'Lvce-Setup'
62
62
  }
63
63
 
64
- export const version = '0.22.3'
64
+ export const version = '0.22.4'
65
65
 
66
- export const commit = '5c984c2'
66
+ export const commit = 'd64edd3'
67
67
 
68
- export const date = '2024-01-13T15:58:30.000Z'
68
+ export const date = '2024-01-20T09:19:06.000Z'
69
69
 
70
70
  export const getVersion = () => {
71
71
  return version
@@ -1,4 +1,4 @@
1
- export const ExtensionHost = 'lvce.extension-host'
2
- export const ExtensionHostHelperProcess = 'lvce.extension-host-helper-process'
3
- export const SharedProcess = 'lvce.shared-process'
4
- export const TerminalProcess = 'lvce.terminal-process'
1
+ export const ExtensionHost = 'extension-host'
2
+ export const ExtensionHostHelperProcess = 'extension-host-helper-process'
3
+ export const SharedProcess = 'shared-process'
4
+ export const TerminalProcess = 'terminal-process'
@@ -1,453 +0,0 @@
1
- [
2
- {
3
- "id": "Layout.toggleSideBar",
4
- "label": "Layout: Toggle Side Bar"
5
- },
6
- {
7
- "id": "Layout.togglePanel",
8
- "label": "Layout: Toggle Panel"
9
- },
10
- {
11
- "id": "Layout.toggleActivityBar",
12
- "label": "Layout: Toggle Activity Bar"
13
- },
14
- {
15
- "id": "Layout.toggleSideBarPosition",
16
- "label": "Layout: Toggle Side Bar Position",
17
- "aliases": ["Position Side Bar", "Move Side Bar", "Side Bar Location"]
18
- },
19
- {
20
- "id": "Focus.output",
21
- "label": "Focus: Output"
22
- },
23
- {
24
- "id": "Focus.nextPart",
25
- "label": "Focus: Next Part"
26
- },
27
- {
28
- "id": "Focus.previousPart",
29
- "label": "Focus: Previous Part"
30
- },
31
- {
32
- "id": "Focus.statusBar",
33
- "label": "Focus: Status Bar"
34
- },
35
- {
36
- "id": "Focus.problems",
37
- "label": "Focus: Problems"
38
- },
39
- {
40
- "id": "Focus.debugConsole",
41
- "label": "Focus: Debug Console"
42
- },
43
- {
44
- "id": "Focus.terminal",
45
- "label": "Focus: Terminal"
46
- },
47
- {
48
- "id": "Terminal.clear",
49
- "label": "Terminal: Clear"
50
- },
51
- {
52
- "id": "Terminal.paste",
53
- "label": "Terminal: Paste"
54
- },
55
- {
56
- "id": "Terminal.kill",
57
- "label": "Terminal: Kill active Instance"
58
- },
59
- {
60
- "id": "Terminal.scrollUpLine",
61
- "label": "Terminal: Scroll Up Line"
62
- },
63
- {
64
- "id": "Terminal.scrollDownLine",
65
- "label": "Terminal: Scroll Down Line"
66
- },
67
- {
68
- "id": "Terminal.scrollUpPage",
69
- "label": "Terminal: Scroll Up Page"
70
- },
71
- {
72
- "id": "Terminal.scrollDownPage",
73
- "label": "Terminal: Scroll Down Page"
74
- },
75
- {
76
- "id": "Focus.previousTerminal",
77
- "label": "Focus: Previous Terminal"
78
- },
79
- {
80
- "id": "Focus.nextTerminal",
81
- "label": "Focus: Next Terminal"
82
- },
83
- {
84
- "id": "Terminal.split",
85
- "label": "Terminal: Split"
86
- },
87
- {
88
- "id": "Terminal.toggleSelection",
89
- "label": "Toggle Selection"
90
- },
91
- {
92
- "id": "Focus.explorer",
93
- "label": "Focus: Explorer"
94
- },
95
- {
96
- "id": "Focus.search",
97
- "label": "Focus: Search"
98
- },
99
- {
100
- "id": "Focus.sourceControl",
101
- "label": "Focus: Source Control"
102
- },
103
- {
104
- "id": "Focus.debugAndRun",
105
- "label": "Focus: Debug and Run"
106
- },
107
- {
108
- "id": "Focus.Extensions",
109
- "label": "Focus: Extensions"
110
- },
111
- {
112
- "id": "Preferences.openUserKeyBindings",
113
- "label": "Preferences: Open User Key Bindings"
114
- },
115
- {
116
- "id": "Preferences.openDefaultKeyBindings",
117
- "label": "Preferences: Open Default Key Bindings",
118
- "aliases": ["Set Key Bindings", "Key Map", "Key Mapping"]
119
- },
120
- {
121
- "id": "Preferences.openSettingsJson",
122
- "label": "Preferences: Open Settings",
123
- "aliases": ["Change Settings", "Configure Settings", "Preferences"]
124
- },
125
- {
126
- "id": "Extensions.openExtensionsFolder",
127
- "label": "Extensions: Open Extensions Folder",
128
- "deprecated": true,
129
- "TODO": "add support for deprecated commands"
130
- },
131
- {
132
- "id": "Extensions.openCachedExtensionsFolder",
133
- "label": "Extensions: Open Cached Extensions Folder"
134
- },
135
- {
136
- "id": "ActivityBar.focus",
137
- "label": "Focus: ActivityBar"
138
- },
139
- {
140
- "id": "Focus.titleBar",
141
- "label": "Focus: Title Bar"
142
- },
143
- {
144
- "id": "ActivityBar.focusNext",
145
- "label": "ActivityBar: Focus Next"
146
- },
147
- {
148
- "id": "ActivityBar.focusPrevious",
149
- "label": "ActivityBar: Focus Previous"
150
- },
151
- {
152
- "id": "ActivityBar.focusFirst",
153
- "label": "ActivityBar: Focus First"
154
- },
155
- {
156
- "id": "ActivityBar.focusLast",
157
- "label": "ActivityBar: Focus Last"
158
- },
159
- {
160
- "id": "Developer.showMemoryUsage",
161
- "label": "Developer: Show Memory Usage"
162
- },
163
- {
164
- "id": "Developer.downloadViewletState",
165
- "label": "Developer: Download Viewlets"
166
- },
167
- {
168
- "id": "Developer.allocateMemoryInSharedProcess",
169
- "label": "Developer: Allocate Memory in Shared Process"
170
- },
171
- {
172
- "id": "Developer.crashSharedProcess",
173
- "label": "Developer: Crash Shared Process"
174
- },
175
- {
176
- "id": "Developer.crashMainProcess",
177
- "label": "Developer: Crash Main Process"
178
- },
179
- {
180
- "id": "Developer.createSharedProcessHeapSnapshot",
181
- "label": "Developer: Create Shared Process Heap Snapshot"
182
- },
183
- {
184
- "id": "Developer.createSharedProcessProfile",
185
- "label": "Developer: Create Shared Process Profile"
186
- },
187
- {
188
- "id": "Developer.clearCache",
189
- "label": "Developer: Clear Cache"
190
- },
191
- {
192
- "id": "Developer.openConfigFolder",
193
- "label": "Developer: Open Config Folder"
194
- },
195
- {
196
- "id": "Developer.openCacheFolder",
197
- "label": "Developer: Open Cache Folder"
198
- },
199
- {
200
- "id": "Developer.openDataFolder",
201
- "label": "Developer: Open Data Folder"
202
- },
203
- {
204
- "id": "Viewlet.openWidget",
205
- "label": "Preferences: Color Theme",
206
- "aliases": ["Select Color Theme", "Switch Color Theme", "Theme Color"],
207
- "args": ["QuickPick", "color-theme"]
208
- },
209
- {
210
- "id": "Developer.measureLatencyBetweenExtensionHostAndSharedProcess",
211
- "label": "Developer: Measure Latency Between Extension Host and Shared Process"
212
- },
213
- {
214
- "id": "Developer.measureLatencyBetweenSharedProcessAndRendererProcess",
215
- "label": "Developer: Measure Latency Between Shared Process and Renderer Process"
216
- },
217
- {
218
- "id": "Developer.showState",
219
- "label": "Developer: Show state"
220
- },
221
- {
222
- "id": "Developer.startupPerformance",
223
- "label": "Developer: Startup Performance"
224
- },
225
- {
226
- "id": "Developer.toggleDeveloperTools",
227
- "label": "Developer: Toggle Developer Tools"
228
- },
229
- {
230
- "id": "RebuildNodePty.rebuildNodePty",
231
- "label": "Developer: Rebuild Node Pty"
232
- },
233
- {
234
- "id": "DebugSharedProcess.debugSharedProcess",
235
- "label": "Developer: Debug Shared Process"
236
- },
237
- {
238
- "id": "Reload.reload",
239
- "label": "Window: Reload",
240
- "aliases": ["Reload Window"]
241
- },
242
- {
243
- "id": "Window.close",
244
- "label": "Window: Close",
245
- "aliases": ["Close Window"]
246
- },
247
- {
248
- "id": "Window.minimize",
249
- "label": "Window: Minimize",
250
- "aliases": ["Minimize Window"]
251
- },
252
- {
253
- "id": "Window.maximize",
254
- "label": "Window: Maximize",
255
- "aliases": ["Maximize Window"]
256
- },
257
- {
258
- "id": "Window.unmaximize",
259
- "label": "Window: Unmaximize",
260
- "aliases": ["Unmaximize Window"]
261
- },
262
- {
263
- "id": "Window.makeScreenshot",
264
- "label": "Window: Make Screenshot"
265
- },
266
- {
267
- "id": "main.EloseEditor",
268
- "label": "Main: Close Editor"
269
- },
270
- {
271
- "id": "main.EloseAllEditors",
272
- "label": "Main: Close all Editors"
273
- },
274
- {
275
- "id": "Editor.indent",
276
- "label": "Editor: Indent",
277
- "aliases": ["Indent More", "DeIndent"]
278
- },
279
- {
280
- "id": "Editor.unindent",
281
- "label": "Editor: Unindent",
282
- "aliases": ["Indent Less", "DeIndent"]
283
- },
284
- {
285
- "id": "Editor.sortLinesAscending",
286
- "label": "Editor: Sort Lines Ascending"
287
- },
288
- {
289
- "id": "Editor.toggleComment",
290
- "label": "Editor: Toggle Comment"
291
- },
292
- {
293
- "id": "Editor.selectUp",
294
- "label": "Editor: Select Up"
295
- },
296
- {
297
- "id": "Editor.selectDown",
298
- "label": "Editor: Select Down"
299
- },
300
- {
301
- "id": "Editor.toggleBlockComment",
302
- "label": "Editor: Toggle Block Comment"
303
- },
304
- {
305
- "id": "Editor.openColorPicker",
306
- "label": "Editor: Open Color Picker"
307
- },
308
- {
309
- "id": "Editor.closeColorPicker",
310
- "label": "Editor: Close Color Picker"
311
- },
312
- {
313
- "id": "Editor.copyLineDown",
314
- "label": "Editor: Copy Line Down"
315
- },
316
- {
317
- "id": "Editor.copyLineUp",
318
- "label": "Editor: Copy Line Up"
319
- },
320
- {
321
- "id": "Editor.moveLineDown",
322
- "label": "Editor: Move Line Down"
323
- },
324
- {
325
- "id": "Editor.moveLineUp",
326
- "label": "Editor: Move Line Up"
327
- },
328
- {
329
- "id": "Dialog.openFolder",
330
- "label": "File: Open Folder"
331
- },
332
- {
333
- "id": "file.openRecent",
334
- "label": "File: Open Recent"
335
- },
336
- {
337
- "id": "About.showAbout",
338
- "label": "Help: About"
339
- },
340
- {
341
- "id": "Editor.format",
342
- "label": "Editor: Format Document"
343
- },
344
- {
345
- "id": "Editor.showHover",
346
- "label": "Editor: Show Hover"
347
- },
348
- {
349
- "id": "Editor.formatForced",
350
- "label": "Editor: Format Document (forced)"
351
- },
352
- {
353
- "id": "Editor.selectNextOccurrence",
354
- "label": "Editor: Select Next Occurrence"
355
- },
356
- {
357
- "id": "Editor.selectAllOccurrences",
358
- "label": "Editor: Select All Occurrences"
359
- },
360
- {
361
- "id": "Editor.goToDefinition",
362
- "label": "Editor: Go To Definition"
363
- },
364
- {
365
- "id": "Editor.goToTypeDefinition",
366
- "label": "Editor: Go To Type Definition"
367
- },
368
- {
369
- "id": "Editor.selectInsideString",
370
- "label": "Editor: Select Inside String"
371
- },
372
- {
373
- "id": "audio.playBell",
374
- "label": "Audio: Play Bell"
375
- },
376
- {
377
- "id": "serviceWorker.uninstall",
378
- "label": "Service Worker: Uninstall"
379
- },
380
- {
381
- "id": "Developer.openLogsFolder",
382
- "label": "Developer: Open Logs Folder"
383
- },
384
- {
385
- "id": "Developer.openProcessExplorer",
386
- "label": "Developer: Open Process Explorer"
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
- },
400
- {
401
- "id": "Explorer.collapseAll",
402
- "label": "Explorer: Collapse All"
403
- },
404
- {
405
- "id": "Explorer.expandAll",
406
- "label": "Explorer: Expand All"
407
- },
408
- {
409
- "id": "Explorer.expandRecursively",
410
- "label": "Explorer: Expand Recursively"
411
- },
412
- {
413
- "id": "SessionReplay.replayCurrentSession",
414
- "label": "SessionReplay: Replay Current Session"
415
- },
416
- {
417
- "id": "SessionReplay.downloadSession",
418
- "label": "SessionReplay: Download Session"
419
- },
420
- {
421
- "id": "SessionReplay.openSession",
422
- "label": "SessionReplay: Open Session"
423
- },
424
- {
425
- "id": "ContentTracing.start",
426
- "label": "Developer: Start Content Tracing"
427
- },
428
- {
429
- "id": "ContentTracing.stop",
430
- "label": "Developer: Stop Content Tracing"
431
- },
432
- {
433
- "id": "Window.zoomIn",
434
- "label": "Window: Zoom In"
435
- },
436
- {
437
- "id": "Window.zoomOut",
438
- "label": "Window: Zoom Out"
439
- },
440
- {
441
- "id": "Window.zoomReset",
442
- "label": "Window: Reset Zoom"
443
- },
444
- {
445
- "id": "Main.openUri",
446
- "label": "Simple Browser: Open",
447
- "args": ["simple-browser://"]
448
- },
449
- {
450
- "id": "SimpleBrowser.openDevtools",
451
- "label": "Simple Browser: Open Dev Devtools"
452
- }
453
- ]
@@ -1 +0,0 @@
1
- []