@lvce-editor/shared-process 0.91.1 → 0.91.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.91.1",
3
+ "version": "0.91.3",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -19,7 +19,7 @@
19
19
  "dependencies": {
20
20
  "@lvce-editor/assert": "1.7.0",
21
21
  "@lvce-editor/auth-process": "1.9.0",
22
- "@lvce-editor/extension-host-helper-process": "0.91.1",
22
+ "@lvce-editor/extension-host-helper-process": "0.91.3",
23
23
  "@lvce-editor/ipc": "16.3.0",
24
24
  "@lvce-editor/json-rpc": "8.2.0",
25
25
  "@lvce-editor/jsonc-parser": "1.5.0",
@@ -34,7 +34,7 @@
34
34
  "optionalDependencies": {
35
35
  "@lvce-editor/embeds-process": "4.9.1",
36
36
  "@lvce-editor/file-system-process": "5.4.0",
37
- "@lvce-editor/file-watcher-process": "4.4.0",
37
+ "@lvce-editor/file-watcher-process": "4.5.0",
38
38
  "@lvce-editor/network-process": "5.2.0",
39
39
  "@lvce-editor/preload": "1.5.0",
40
40
  "@lvce-editor/preview-process": "11.0.0",
@@ -3,6 +3,6 @@ import { fileURLToPath } from 'url'
3
3
 
4
4
  export const getBuiltinExtensionsPath = () => {
5
5
  const staticServerPath = fileURLToPath(import.meta.resolve('@lvce-editor/static-server'))
6
- const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '4010ea0', 'extensions')
6
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'fdb0e8e', 'extensions')
7
7
  return builtinExtensionsPath
8
8
  }
@@ -15,6 +15,7 @@ export const ENOTDIR = 'ENOTDIR'
15
15
  export const EPERM = 'EPERM'
16
16
  export const EPIPE = 'EPIPE'
17
17
  export const ERR_IPC_CHANNEL_CLOSED = 'ERR_IPC_CHANNEL_CLOSED'
18
+ export const ERR_INVALID_TYPESCRIPT_SYNTAX = 'ERR_INVALID_TYPESCRIPT_SYNTAX'
18
19
  export const ERR_MODULE_NOT_FOUND = 'ERR_MODULE_NOT_FOUND'
19
20
  export const EXDEV = 'EXDEV'
20
21
  export const ERR_DLOPEN_FAILED = 'ERR_DLOPEN_FAILED'
@@ -7,8 +7,10 @@ import * as GetNotFoundResponse from '../GetNotFoundResponse/GetNotFoundResponse
7
7
  import * as GetNotModifiedResponse from '../GetNotModifiedResponse/GetNotModifiedResponse.js'
8
8
  import * as GetPathEtag from '../GetPathEtag/GetPathEtag.js'
9
9
  import * as GetServerErrorResponse from '../GetServerErrorResponse/GetServerErrorResponse.js'
10
+ import * as GetTypeScriptSyntaxErrorResponse from '../GetTypeScriptSyntaxErrorResponse/GetTypeScriptSyntaxErrorResponse.js'
10
11
  import * as HttpHeader from '../HttpHeader/HttpHeader.js'
11
12
  import * as IsEnoentError from '../IsEnoentError/IsEnoentError.js'
13
+ import * as IsTypeScriptSyntaxError from '../IsTypeScriptSyntaxError/IsTypeScriptSyntaxError.js'
12
14
  import * as Logger from '../Logger/Logger.js'
13
15
 
14
16
  // TODO maybe handle app responses and webview responses separately
@@ -48,6 +50,9 @@ export const getElectronFileResponse = async (url, request) => {
48
50
  return GetNotFoundResponse.getNotFoundResponse()
49
51
  }
50
52
  Logger.error(error)
53
+ if (IsTypeScriptSyntaxError.isTypeScriptSyntaxError(error)) {
54
+ return GetTypeScriptSyntaxErrorResponse.getTypeScriptSyntaxErrorResponse()
55
+ }
51
56
  return GetServerErrorResponse.getServerErrorResponse()
52
57
  }
53
58
  }
@@ -0,0 +1,14 @@
1
+ import * as HttpStatusCode from '../HttpStatusCode/HttpStatusCode.js'
2
+
3
+ const message = 'TypeScript file has a syntax error'
4
+
5
+ export const getTypeScriptSyntaxErrorResponse = () => {
6
+ return {
7
+ body: message,
8
+ init: {
9
+ headers: {},
10
+ status: HttpStatusCode.UnprocessableContent,
11
+ statusText: message,
12
+ },
13
+ }
14
+ }
@@ -1,6 +1,7 @@
1
1
  export const NotFound = 404
2
2
  export const Ok = 200
3
3
  export const Forbidden = 403
4
+ export const UnprocessableContent = 422
4
5
  export const ServerError = 500
5
6
  export const NotModifed = 304
6
7
  export const MultipleChoices = 300
@@ -0,0 +1,5 @@
1
+ import * as ErrorCodes from '../ErrorCodes/ErrorCodes.js'
2
+
3
+ export const isTypeScriptSyntaxError = (error) => {
4
+ return error?.code === ErrorCodes.ERR_INVALID_TYPESCRIPT_SYNTAX
5
+ }
@@ -61,11 +61,11 @@ export const getSetupName = () => {
61
61
  return 'Lvce-Setup'
62
62
  }
63
63
 
64
- export const version = '0.91.1'
64
+ export const version = '0.91.3'
65
65
 
66
- export const commit = '4010ea0'
66
+ export const commit = 'fdb0e8e'
67
67
 
68
- export const date = '2026-07-15T10:07:17.000Z'
68
+ export const date = '2026-07-15T13:09:33.000Z'
69
69
 
70
70
  export const getVersion = () => {
71
71
  return version
@@ -2,5 +2,5 @@ import { join } from 'node:path'
2
2
  import * as Root from '../Root/Root.js'
3
3
 
4
4
  export const getPreloadUrl = () => {
5
- return join(Root.root, 'static', '4010ea0', 'packages', 'preload', 'dist', 'index.js')
5
+ return join(Root.root, 'static', 'fdb0e8e', 'packages', 'preload', 'dist', 'index.js')
6
6
  }