@lvce-editor/shared-process 0.95.2 → 0.95.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.95.2",
3
+ "version": "0.95.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.12.0",
22
- "@lvce-editor/extension-host-helper-process": "0.95.2",
22
+ "@lvce-editor/extension-host-helper-process": "0.95.3",
23
23
  "@lvce-editor/ipc": "16.6.0",
24
24
  "@lvce-editor/json-rpc": "8.5.0",
25
25
  "@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', '0a72652', 'extensions')
6
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '6f688db', 'extensions')
7
7
  return builtinExtensionsPath
8
8
  }
@@ -104,6 +104,8 @@ const wait = (duration) => {
104
104
  })
105
105
  }
106
106
 
107
+ const PublishDiagnosticsTimeout = 1_000
108
+
107
109
  export class LanguageServerConnection {
108
110
  child
109
111
  configurationHandled = createDeferred()
@@ -514,7 +516,25 @@ export class LanguageServerConnection {
514
516
  waitForPublishedDiagnostics(uri) {
515
517
  return new Promise ((resolve, reject) => {
516
518
  const waiters = this.diagnosticWaiters.get(uri) || new Set()
517
- waiters.add({ reject, resolve })
519
+ let timeout
520
+ const waiter = {
521
+ reject(error) {
522
+ clearTimeout(timeout)
523
+ reject(error)
524
+ },
525
+ resolve(value) {
526
+ clearTimeout(timeout)
527
+ resolve(value)
528
+ },
529
+ }
530
+ timeout = setTimeout(() => {
531
+ waiters.delete(waiter)
532
+ if (waiters.size === 0) {
533
+ this.diagnosticWaiters.delete(uri)
534
+ }
535
+ resolve(this.publishedDiagnostics.get(uri) || [])
536
+ }, PublishDiagnosticsTimeout)
537
+ waiters.add(waiter)
518
538
  this.diagnosticWaiters.set(uri, waiters)
519
539
  })
520
540
  }
@@ -2,9 +2,22 @@ import { pathToFileURL } from 'node:url'
2
2
 
3
3
  const windowsFileUriRegex = /^file:\/\/\/([a-z])(?::|%3a)(?=\/|$)/i
4
4
 
5
+ const normalizeRemoteFileUrl = (uri) => {
6
+ try {
7
+ const url = new URL(uri)
8
+ if ((url.protocol === 'http:' || url.protocol === 'https:') && url.pathname.startsWith('/remote/')) {
9
+ return `file://${url.pathname.slice('/remote'.length)}`
10
+ }
11
+ } catch {
12
+ return undefined
13
+ }
14
+ return undefined
15
+ }
16
+
5
17
  export const normalizeLanguageServerDocumentUri = (uri) => {
6
18
  if (uri.startsWith('/')) {
7
19
  return pathToFileURL(uri).href
8
20
  }
9
- return uri.replace(windowsFileUriRegex, (_, driveLetter) => `file:///${driveLetter.toLowerCase()}%3A`)
21
+ const normalizedUri = normalizeRemoteFileUrl(uri) || uri
22
+ return normalizedUri.replace(windowsFileUriRegex, (_, driveLetter) => `file:///${driveLetter.toLowerCase()}%3A`)
10
23
  }
@@ -61,11 +61,11 @@ export const getSetupName = () => {
61
61
  return 'Lvce-Setup'
62
62
  }
63
63
 
64
- export const version = '0.95.2'
64
+ export const version = '0.95.3'
65
65
 
66
- export const commit = '0a72652'
66
+ export const commit = '6f688db'
67
67
 
68
- export const date = '2026-07-29T18:04:24.000Z'
68
+ export const date = '2026-07-29T19:12:57.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', '0a72652', 'packages', 'preload', 'dist', 'index.js')
5
+ return join(Root.root, 'static', '6f688db', 'packages', 'preload', 'dist', 'index.js')
6
6
  }