@lvce-editor/shared-process 0.100.13 → 0.100.14

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.100.13",
3
+ "version": "0.100.14",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -18,28 +18,28 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@lvce-editor/assert": "1.9.0",
21
- "@lvce-editor/extension-host-helper-process": "0.100.13",
22
- "@lvce-editor/ipc": "16.10.0",
21
+ "@lvce-editor/extension-host-helper-process": "0.100.14",
22
+ "@lvce-editor/ipc": "16.11.0",
23
23
  "@lvce-editor/json-rpc": "8.6.0",
24
24
  "@lvce-editor/jsonc-parser": "1.5.0",
25
25
  "@lvce-editor/pretty-error": "2.0.0",
26
26
  "@lvce-editor/process-explorer": "3.14.0",
27
- "@lvce-editor/rpc-registry": "9.48.0",
27
+ "@lvce-editor/rpc-registry": "9.51.0",
28
28
  "@lvce-editor/verror": "1.7.0",
29
29
  "is-object": "^1.0.2",
30
30
  "markdown-it": "^15.0.0",
31
31
  "xdg-basedir": "^5.1.0"
32
32
  },
33
33
  "optionalDependencies": {
34
- "@lvce-editor/embeds-process": "4.15.0",
34
+ "@lvce-editor/embeds-process": "4.16.0",
35
35
  "@lvce-editor/file-system-process": "5.14.0",
36
- "@lvce-editor/file-watcher-process": "4.12.0",
36
+ "@lvce-editor/file-watcher-process": "4.13.0",
37
37
  "@lvce-editor/network-process": "5.2.0",
38
38
  "@lvce-editor/preload": "1.5.0",
39
39
  "@lvce-editor/preview-process": "11.0.0",
40
40
  "@lvce-editor/pty-host": "8.7.0",
41
- "@lvce-editor/search-process": "15.7.0",
42
- "@lvce-editor/typescript-compile-process": "5.8.0",
41
+ "@lvce-editor/search-process": "15.8.0",
42
+ "@lvce-editor/typescript-compile-process": "5.9.0",
43
43
  "open": "^11.0.0",
44
44
  "tail": "^2.2.6",
45
45
  "tmp-promise": "^3.0.3",
@@ -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', '9713834', 'extensions')
6
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '8669cbe', 'extensions')
7
7
  return builtinExtensionsPath
8
8
  }
@@ -6,5 +6,6 @@ export const Commands = {
6
6
  complete: LanguageServer.complete,
7
7
  definition: LanguageServer.definition,
8
8
  diagnostic: LanguageServer.diagnostic,
9
+ dispose: LanguageServer.dispose,
9
10
  format: LanguageServer.format,
10
11
  }
@@ -11,6 +11,7 @@ import { normalizeLanguageServerDocumentUri } from '../NormalizeLanguageServerDo
11
11
 
12
12
 
13
13
 
14
+
14
15
 
15
16
 
16
17
 
@@ -20,6 +21,7 @@ import { normalizeLanguageServerDocumentUri } from '../NormalizeLanguageServerDo
20
21
 
21
22
 
22
23
 
24
+
23
25
 
24
26
 
25
27
 
@@ -30,6 +32,7 @@ import { normalizeLanguageServerDocumentUri } from '../NormalizeLanguageServerDo
30
32
 
31
33
 
32
34
 
35
+
33
36
 
34
37
 
35
38
 
@@ -39,6 +42,7 @@ import { normalizeLanguageServerDocumentUri } from '../NormalizeLanguageServerDo
39
42
 
40
43
 
41
44
 
45
+
42
46
 
43
47
 
44
48
 
@@ -58,9 +62,9 @@ const hasSameOptions = (state, uri, argv) => {
58
62
  return state.uri === uri && state.argv.length === argv.length && state.argv.every((argument, index) => argument === argv[index])
59
63
  }
60
64
 
61
- const getConnection = (id, uri, argv, rootUri) => {
65
+ const getConnection = (id, extensionId, uri, argv, rootUri) => {
62
66
  const existing = connections.get(id)
63
- if (existing && existing.connection.isRunning() && hasSameOptions(existing, uri, argv)) {
67
+ if (existing && existing.extensionId === extensionId && existing.connection.isRunning() && hasSameOptions(existing, uri, argv)) {
64
68
  return existing.connection
65
69
  }
66
70
  existing?.connection.dispose()
@@ -68,51 +72,61 @@ const getConnection = (id, uri, argv, rootUri) => {
68
72
  connections.set(id, {
69
73
  argv: [...argv],
70
74
  connection,
75
+ extensionId,
71
76
  uri,
72
77
  })
73
78
  return connection
74
79
  }
75
80
 
76
- export const complete = async ({ argv, id, offset, rootUri, textDocument, uri } ) => {
81
+ export const complete = async ({ argv, extensionId, id, offset, rootUri, textDocument, uri } ) => {
77
82
  const normalizedDocument = {
78
83
  ...textDocument,
79
84
  uri: normalizeLanguageServerDocumentUri(textDocument.uri),
80
85
  }
81
86
  const normalizedRootUri = rootUri ? normalizeLanguageServerDocumentUri(rootUri) : getRootUri(normalizedDocument.uri)
82
- const connection = getConnection(`${id}:${normalizedRootUri}`, uri, argv, normalizedRootUri)
87
+ const connection = getConnection(`${id}:${normalizedRootUri}`, extensionId, uri, argv, normalizedRootUri)
83
88
  return connection.complete(normalizedDocument, offset)
84
89
  }
85
90
 
86
- export const diagnostic = async ({ argv, id, rootUri, textDocument, uri } ) => {
91
+ export const diagnostic = async ({ argv, extensionId, id, rootUri, textDocument, uri } ) => {
87
92
  const normalizedDocument = {
88
93
  ...textDocument,
89
94
  uri: normalizeLanguageServerDocumentUri(textDocument.uri),
90
95
  }
91
96
  const normalizedRootUri = rootUri ? normalizeLanguageServerDocumentUri(rootUri) : getRootUri(normalizedDocument.uri)
92
- const connection = getConnection(`${id}:${normalizedRootUri}`, uri, argv, normalizedRootUri)
97
+ const connection = getConnection(`${id}:${normalizedRootUri}`, extensionId, uri, argv, normalizedRootUri)
93
98
  return connection.diagnostic(normalizedDocument)
94
99
  }
95
100
 
96
- export const definition = async ({ argv, id, offset, rootUri, textDocument, uri } ) => {
101
+ export const definition = async ({ argv, extensionId, id, offset, rootUri, textDocument, uri } ) => {
97
102
  const normalizedDocument = {
98
103
  ...textDocument,
99
104
  uri: normalizeLanguageServerDocumentUri(textDocument.uri),
100
105
  }
101
106
  const normalizedRootUri = rootUri ? normalizeLanguageServerDocumentUri(rootUri) : getRootUri(normalizedDocument.uri)
102
- const connection = getConnection(`${id}:${normalizedRootUri}`, uri, argv, normalizedRootUri)
107
+ const connection = getConnection(`${id}:${normalizedRootUri}`, extensionId, uri, argv, normalizedRootUri)
103
108
  return connection.definition(normalizedDocument, offset)
104
109
  }
105
110
 
106
- export const format = async ({ argv, id, rootUri, textDocument, uri } ) => {
111
+ export const format = async ({ argv, extensionId, id, rootUri, textDocument, uri } ) => {
107
112
  const normalizedDocument = {
108
113
  ...textDocument,
109
114
  uri: normalizeLanguageServerDocumentUri(textDocument.uri),
110
115
  }
111
116
  const normalizedRootUri = rootUri ? normalizeLanguageServerDocumentUri(rootUri) : getRootUri(normalizedDocument.uri)
112
- const connection = getConnection(`${id}:${normalizedRootUri}`, uri, argv, normalizedRootUri)
117
+ const connection = getConnection(`${id}:${normalizedRootUri}`, extensionId, uri, argv, normalizedRootUri)
113
118
  return connection.format(normalizedDocument)
114
119
  }
115
120
 
121
+ export const dispose = (extensionId) => {
122
+ for (const [id, state] of connections) {
123
+ if (state.extensionId === extensionId) {
124
+ state.connection.dispose()
125
+ connections.delete(id)
126
+ }
127
+ }
128
+ }
129
+
116
130
  export const disposeAll = () => {
117
131
  for (const state of connections.values()) {
118
132
  state.connection.dispose()
@@ -214,6 +214,7 @@ export const getModuleId = (commandId) => {
214
214
  case 'LanguageServer.complete':
215
215
  case 'LanguageServer.definition':
216
216
  case 'LanguageServer.diagnostic':
217
+ case 'LanguageServer.dispose':
217
218
  case 'LanguageServer.format':
218
219
  return ModuleId.LanguageServer
219
220
  case 'ListProcessesWithMemoryUsage.listProcessesWithMemoryUsage':
@@ -61,11 +61,11 @@ export const getSetupName = () => {
61
61
  return 'Lvce-Setup'
62
62
  }
63
63
 
64
- export const version = '0.100.13'
64
+ export const version = '0.100.14'
65
65
 
66
- export const commit = '9713834'
66
+ export const commit = '8669cbe'
67
67
 
68
- export const date = '2026-08-11T00:17:11.000Z'
68
+ export const date = '2026-08-11T07:38:52.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', '9713834', 'packages', 'preload', 'dist', 'index.js')
5
+ return join(Root.root, 'static', '8669cbe', 'packages', 'preload', 'dist', 'index.js')
6
6
  }