@lvce-editor/server 0.53.6 → 0.53.7

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.
@@ -2,7 +2,7 @@ This project incorporates components from the projects listed below, that may ha
2
2
  differing from this project:
3
3
 
4
4
 
5
- 1) License Notice for static/f429d0a/icons (from https://github.com/microsoft/vscode-icons)
5
+ 1) License Notice for static/92d11f3/icons (from https://github.com/microsoft/vscode-icons)
6
6
  ---------------------------------------
7
7
 
8
8
  Attribution 4.0 International
@@ -402,7 +402,7 @@ public licenses.
402
402
  Creative Commons may be contacted at creativecommons.org.
403
403
 
404
404
 
405
- 2) License Notice for static/f429d0a/fonts/FiraCode-VariableFont.ttf (from https://github.com/tonsky/FiraCode)
405
+ 2) License Notice for static/92d11f3/fonts/FiraCode-VariableFont.ttf (from https://github.com/tonsky/FiraCode)
406
406
  ---------------------------------------
407
407
 
408
408
  Copyright (c) 2014, The Fira Code Project Authors (https://github.com/tonsky/FiraCode)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/server",
3
- "version": "0.53.6",
3
+ "version": "0.53.7",
4
4
  "description": "Run LVCE Editor as a server.",
5
5
  "main": "index.js",
6
6
  "bin": "bin/server.js",
@@ -20,7 +20,7 @@
20
20
  "node": ">=18"
21
21
  },
22
22
  "dependencies": {
23
- "@lvce-editor/shared-process": "0.53.6",
24
- "@lvce-editor/static-server": "0.53.6"
23
+ "@lvce-editor/shared-process": "0.53.7",
24
+ "@lvce-editor/static-server": "0.53.7"
25
25
  }
26
26
  }
package/src/server.js CHANGED
@@ -46,7 +46,7 @@ const isStatic = (url) => {
46
46
  if(url === '/'){
47
47
  return true
48
48
  }
49
- if (url.startsWith('/f429d0a')) {
49
+ if (url.startsWith('/92d11f3')) {
50
50
  return true
51
51
  }
52
52
  if (url.startsWith('/favicon.ico')) {
@@ -222,14 +222,22 @@ const handleRequestError = (error) => {
222
222
  console.info('[info]: request upgrade error', error)
223
223
  }
224
224
 
225
- const handleSocketError = (error) => {
225
+ const handleSocketUpgradeError = (error) => {
226
226
  // @ts-ignore
227
227
  console.info('[info] request socket upgrade error', error)
228
228
  }
229
229
 
230
+ const handleSocketError = (error) => {
231
+ if (error && error.code === 'ECONNRESET') {
232
+ return
233
+ }
234
+ // @ts-ignore
235
+ console.info('[info] request socket error', error)
236
+ }
237
+
230
238
  const sendHandleSharedProcess = async (request, socket, method, ...params) => {
231
239
  request.on('error', handleRequestError)
232
- socket.on('error', handleSocketError)
240
+ socket.on('error', handleSocketUpgradeError)
233
241
  const sharedProcess = await getOrCreateSharedProcess()
234
242
  sharedProcess.send(
235
243
  {