@lvce-editor/shared-process 0.100.26 → 0.101.0
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 +2 -2
- package/src/parts/BuiltinExtensionsPath/BuiltinExtensionsPath.js +1 -1
- package/src/parts/LanguageServer/LanguageServer.ipc.js +1 -0
- package/src/parts/LanguageServer/LanguageServer.js +12 -0
- package/src/parts/LanguageServerConnection/LanguageServerConnection.js +24 -0
- package/src/parts/ModuleMap/ModuleMap.js +1 -0
- package/src/parts/Platform/Platform.js +3 -3
- package/src/parts/PreloadUrl/PreloadUrl.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.101.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@lvce-editor/assert": "1.9.0",
|
|
21
|
-
"@lvce-editor/extension-host-helper-process": "0.
|
|
21
|
+
"@lvce-editor/extension-host-helper-process": "0.101.0",
|
|
22
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",
|
|
@@ -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', '
|
|
6
|
+
const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '6422566', 'extensions')
|
|
7
7
|
return builtinExtensionsPath
|
|
8
8
|
}
|
|
@@ -29,6 +29,8 @@ import { normalizeLanguageServerDocumentUri } from '../NormalizeLanguageServerDo
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
|
|
33
|
+
|
|
32
34
|
|
|
33
35
|
|
|
34
36
|
|
|
@@ -130,6 +132,16 @@ export const format = async ({ argv, extensionId, id, rootUri, textDocument, uri
|
|
|
130
132
|
return connection.format(normalizedDocument)
|
|
131
133
|
}
|
|
132
134
|
|
|
135
|
+
export const references = async ({ argv, extensionId, id, offset, rootUri, textDocument, uri } ) => {
|
|
136
|
+
const normalizedDocument = {
|
|
137
|
+
...textDocument,
|
|
138
|
+
uri: normalizeLanguageServerDocumentUri(textDocument.uri),
|
|
139
|
+
}
|
|
140
|
+
const normalizedRootUri = rootUri ? normalizeLanguageServerDocumentUri(rootUri) : getRootUri(normalizedDocument.uri)
|
|
141
|
+
const connection = getConnection(`${id}:${normalizedRootUri}`, extensionId, uri, argv, normalizedRootUri)
|
|
142
|
+
return connection.references(normalizedDocument, offset)
|
|
143
|
+
}
|
|
144
|
+
|
|
133
145
|
export const dispose = (extensionId) => {
|
|
134
146
|
for (const [id, state] of connections) {
|
|
135
147
|
if (state.extensionId === extensionId) {
|
|
@@ -34,6 +34,7 @@ import { normalizeLanguageServerDocumentUri } from '../NormalizeLanguageServerDo
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
|
|
@@ -170,6 +171,7 @@ export class LanguageServerConnection {
|
|
|
170
171
|
supportsCodeActions = false
|
|
171
172
|
supportsDocumentFormatting = false
|
|
172
173
|
supportsPullDiagnostics = false
|
|
174
|
+
supportsReferences = false
|
|
173
175
|
|
|
174
176
|
constructor({ argv, rootUri, uri } ) {
|
|
175
177
|
this.rootUri = rootUri
|
|
@@ -310,6 +312,24 @@ export class LanguageServerConnection {
|
|
|
310
312
|
return Array.isArray(result) ? result : []
|
|
311
313
|
}
|
|
312
314
|
|
|
315
|
+
async references(textDocument, offset) {
|
|
316
|
+
await this.ready
|
|
317
|
+
if (!this.supportsReferences) {
|
|
318
|
+
return []
|
|
319
|
+
}
|
|
320
|
+
this.syncDocument(textDocument)
|
|
321
|
+
const result = await this.sendRequest('textDocument/references', {
|
|
322
|
+
context: {
|
|
323
|
+
includeDeclaration: true,
|
|
324
|
+
},
|
|
325
|
+
position: getPosition(textDocument.text, offset),
|
|
326
|
+
textDocument: {
|
|
327
|
+
uri: textDocument.uri,
|
|
328
|
+
},
|
|
329
|
+
})
|
|
330
|
+
return Array.isArray(result) ? result : []
|
|
331
|
+
}
|
|
332
|
+
|
|
313
333
|
configureMarkdown(languageId) {
|
|
314
334
|
if (languageId !== 'markdown' || this.markdownConfigured) {
|
|
315
335
|
return
|
|
@@ -372,6 +392,9 @@ export class LanguageServerConnection {
|
|
|
372
392
|
publishDiagnostics: {
|
|
373
393
|
relatedInformation: true,
|
|
374
394
|
},
|
|
395
|
+
references: {
|
|
396
|
+
dynamicRegistration: false,
|
|
397
|
+
},
|
|
375
398
|
synchronization: {
|
|
376
399
|
didSave: true,
|
|
377
400
|
dynamicRegistration: false,
|
|
@@ -400,6 +423,7 @@ export class LanguageServerConnection {
|
|
|
400
423
|
this.supportsCodeActions = Boolean(result?.capabilities?.codeActionProvider)
|
|
401
424
|
this.supportsDocumentFormatting = Boolean(result?.capabilities?.documentFormattingProvider)
|
|
402
425
|
this.supportsPullDiagnostics = Boolean(result?.capabilities?.diagnosticProvider)
|
|
426
|
+
this.supportsReferences = Boolean(result?.capabilities?.referencesProvider)
|
|
403
427
|
this.sendNotification('initialized', {})
|
|
404
428
|
await Promise.race([this.initializationProgressStarted.promise, wait(100)])
|
|
405
429
|
if (this.initializationProgressWasStarted) {
|
|
@@ -217,6 +217,7 @@ export const getModuleId = (commandId) => {
|
|
|
217
217
|
case 'LanguageServer.diagnostic':
|
|
218
218
|
case 'LanguageServer.dispose':
|
|
219
219
|
case 'LanguageServer.format':
|
|
220
|
+
case 'LanguageServer.references':
|
|
220
221
|
return ModuleId.LanguageServer
|
|
221
222
|
case 'ListProcessesWithMemoryUsage.listProcessesWithMemoryUsage':
|
|
222
223
|
return ModuleId.ListProcessesWithMemoryUsage
|
|
@@ -61,11 +61,11 @@ export const getSetupName = () => {
|
|
|
61
61
|
return 'Lvce-Setup'
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export const version = '0.
|
|
64
|
+
export const version = '0.101.0'
|
|
65
65
|
|
|
66
|
-
export const commit = '
|
|
66
|
+
export const commit = '6422566'
|
|
67
67
|
|
|
68
|
-
export const date = '2026-08-
|
|
68
|
+
export const date = '2026-08-13T16:04:17.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', '
|
|
5
|
+
return join(Root.root, 'static', '6422566', 'packages', 'preload', 'dist', 'index.js')
|
|
6
6
|
}
|