@lvce-editor/shared-process 0.122.5 → 0.122.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.
- package/package.json +3 -3
- package/src/parts/BuiltinExtensionsPath/BuiltinExtensionsPath.js +1 -1
- package/src/parts/LanguageServerConnection/LanguageServerConnection.js +22 -10
- 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/src/parts/Workers/Workers.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.122.
|
|
3
|
+
"version": "0.122.7",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@lvce-editor/json-rpc": "8.9.0",
|
|
24
24
|
"@lvce-editor/jsonc-parser": "1.5.2",
|
|
25
25
|
"@lvce-editor/pretty-error": "2.0.2",
|
|
26
|
-
"@lvce-editor/process-explorer": "3.
|
|
26
|
+
"@lvce-editor/process-explorer": "3.34.0",
|
|
27
27
|
"@lvce-editor/rpc-registry": "9.66.0",
|
|
28
28
|
"@lvce-editor/verror": "1.7.0",
|
|
29
29
|
"is-object": "^1.0.2",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@lvce-editor/preview-process": "11.0.0",
|
|
41
41
|
"@lvce-editor/pty-host": "8.11.2",
|
|
42
42
|
"@lvce-editor/search-process": "15.11.0",
|
|
43
|
-
"@lvce-editor/typescript-compile-process": "5.
|
|
43
|
+
"@lvce-editor/typescript-compile-process": "5.11.0",
|
|
44
44
|
"open": "^11.0.4",
|
|
45
45
|
"tail": "^2.2.6",
|
|
46
46
|
"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', '
|
|
6
|
+
const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'f15462f', 'extensions')
|
|
7
7
|
return builtinExtensionsPath
|
|
8
8
|
}
|
|
@@ -21,6 +21,7 @@ import { normalizeLanguageServerDocumentUri } from '../NormalizeLanguageServerDo
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
+
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
|
|
@@ -147,6 +148,9 @@ const wait = (duration) => {
|
|
|
147
148
|
}
|
|
148
149
|
|
|
149
150
|
const PublishDiagnosticsTimeout = 1_000
|
|
151
|
+
// Push servers can publish several diagnostic stages, including an unchanged
|
|
152
|
+
// intermediate result after didChange. Collect the burst before returning it.
|
|
153
|
+
const PublishDiagnosticsSettleTime = 300
|
|
150
154
|
|
|
151
155
|
export class LanguageServerConnection {
|
|
152
156
|
child
|
|
@@ -267,7 +271,7 @@ export class LanguageServerConnection {
|
|
|
267
271
|
const previous = this.documents.get(textDocument.uri)
|
|
268
272
|
const documentChanged = !previous || previous.languageId !== textDocument.languageId || previous.text !== textDocument.text
|
|
269
273
|
const cached = this.publishedDiagnostics.get(textDocument.uri)
|
|
270
|
-
if (!documentChanged && cached) {
|
|
274
|
+
if (!documentChanged && cached && !this.diagnosticWaiters.has(textDocument.uri)) {
|
|
271
275
|
return cached
|
|
272
276
|
}
|
|
273
277
|
const diagnostics = this.waitForPublishedDiagnostics(textDocument.uri)
|
|
@@ -510,9 +514,8 @@ export class LanguageServerConnection {
|
|
|
510
514
|
if (!waiters) {
|
|
511
515
|
return
|
|
512
516
|
}
|
|
513
|
-
this.diagnosticWaiters.delete(normalizedUri)
|
|
514
517
|
for (const waiter of waiters) {
|
|
515
|
-
waiter.
|
|
518
|
+
waiter.publish(diagnostics)
|
|
516
519
|
}
|
|
517
520
|
}
|
|
518
521
|
|
|
@@ -614,22 +617,31 @@ export class LanguageServerConnection {
|
|
|
614
617
|
return new Promise ((resolve, reject) => {
|
|
615
618
|
const waiters = this.diagnosticWaiters.get(uri) || new Set()
|
|
616
619
|
let timeout
|
|
620
|
+
let settling
|
|
621
|
+
const removeWaiter = () => {
|
|
622
|
+
clearTimeout(timeout)
|
|
623
|
+
clearTimeout(settling)
|
|
624
|
+
waiters.delete(waiter)
|
|
625
|
+
if (waiters.size === 0) {
|
|
626
|
+
this.diagnosticWaiters.delete(uri)
|
|
627
|
+
}
|
|
628
|
+
}
|
|
617
629
|
const waiter = {
|
|
630
|
+
publish(value) {
|
|
631
|
+
clearTimeout(settling)
|
|
632
|
+
settling = setTimeout(() => waiter.resolve(value), PublishDiagnosticsSettleTime)
|
|
633
|
+
},
|
|
618
634
|
reject(error) {
|
|
619
|
-
|
|
635
|
+
removeWaiter()
|
|
620
636
|
reject(error)
|
|
621
637
|
},
|
|
622
638
|
resolve(value) {
|
|
623
|
-
|
|
639
|
+
removeWaiter()
|
|
624
640
|
resolve(value)
|
|
625
641
|
},
|
|
626
642
|
}
|
|
627
643
|
timeout = setTimeout(() => {
|
|
628
|
-
|
|
629
|
-
if (waiters.size === 0) {
|
|
630
|
-
this.diagnosticWaiters.delete(uri)
|
|
631
|
-
}
|
|
632
|
-
resolve(this.publishedDiagnostics.get(uri) || [])
|
|
644
|
+
waiter.resolve(this.publishedDiagnostics.get(uri) || [])
|
|
633
645
|
}, PublishDiagnosticsTimeout)
|
|
634
646
|
waiters.add(waiter)
|
|
635
647
|
this.diagnosticWaiters.set(uri, waiters)
|
|
@@ -142,6 +142,7 @@ export const getModuleId = (commandId) => {
|
|
|
142
142
|
case 'FileSystem.readJson':
|
|
143
143
|
case 'FileSystem.remove':
|
|
144
144
|
case 'FileSystem.rename':
|
|
145
|
+
case 'FileSystem.statWithMetadata':
|
|
145
146
|
case 'FileSystem.writeFile':
|
|
146
147
|
return ModuleId.FileSystem
|
|
147
148
|
case 'FileSystemDisk.chmod':
|
|
@@ -56,11 +56,11 @@ export const getSetupName = () => {
|
|
|
56
56
|
return 'Lvce-Setup'
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export const version = '0.122.
|
|
59
|
+
export const version = '0.122.7'
|
|
60
60
|
|
|
61
|
-
export const commit = '
|
|
61
|
+
export const commit = 'f15462f'
|
|
62
62
|
|
|
63
|
-
export const date = '2026-10-
|
|
63
|
+
export const date = '2026-10-12T14:04:27.000Z'
|
|
64
64
|
|
|
65
65
|
export const getVersion = () => {
|
|
66
66
|
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', 'f15462f', 'packages', 'preload', 'dist', 'index.js')
|
|
6
6
|
}
|
|
@@ -1542,13 +1542,13 @@
|
|
|
1542
1542
|
"viewlet": {
|
|
1543
1543
|
"name": "ProcessExplorer",
|
|
1544
1544
|
"css": ["/css/parts/MaskIcon.css", "/css/parts/ViewletProcessExplorer.css"],
|
|
1545
|
-
"state": { "idKey": "uid", "fields": ["parentUid", "uri", "x", "y", "width", "height"], "contextFields": ["platform", "assetDir"] },
|
|
1545
|
+
"state": { "idKey": "uid", "fields": ["parentUid", "uri", "x", "y", "width", "height"], "contextFields": ["platform", "assetDir", "processExplorerUpdateInterval"] },
|
|
1546
1546
|
"commandPrefix": "ProcessExplorer",
|
|
1547
1547
|
"methods": {
|
|
1548
1548
|
"create": { "name": "ProcessExplorer.create", "parameters": [
|
|
1549
1549
|
{ "source": "state", "name": "uid" }, { "source": "state", "name": "uri" }, { "source": "state", "name": "x" },
|
|
1550
1550
|
{ "source": "state", "name": "y" }, { "source": "state", "name": "width" }, { "source": "state", "name": "height" },
|
|
1551
|
-
{ "source": "
|
|
1551
|
+
{ "source": "context", "name": "processExplorerArgs" }, { "source": "state", "name": "parentUid" }, { "source": "state", "name": "platform" },
|
|
1552
1552
|
{ "source": "state", "name": "assetDir" }
|
|
1553
1553
|
] },
|
|
1554
1554
|
"loadContent": { "name": "ProcessExplorer.loadContent", "parameters": [{ "source": "state", "name": "uid" }, { "source": "argument", "name": "savedState" }] },
|