@lvce-editor/shared-process 0.102.4 → 0.103.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 +3 -3
- package/src/parts/BuiltinExtensionsPath/BuiltinExtensionsPath.js +1 -1
- package/src/parts/ContentSecurityPolicyDocument/ContentSecurityPolicyDocument.js +1 -1
- package/src/parts/GetTypeFromUrl/GetTypeFromUrl.js +13 -11
- package/src/parts/IsAllowedWebSocketOrigin/IsAllowedWebSocketOrigin.js +3 -0
- package/src/parts/LanguageServer/LanguageServer.ipc.js +1 -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.103.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.103.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",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
34
|
"@lvce-editor/embeds-process": "4.16.0",
|
|
35
|
-
"@lvce-editor/file-system-process": "5.
|
|
35
|
+
"@lvce-editor/file-system-process": "5.15.0",
|
|
36
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",
|
|
@@ -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', '8afc276', 'extensions')
|
|
7
7
|
return builtinExtensionsPath
|
|
8
8
|
}
|
|
@@ -5,17 +5,19 @@ export const getTypeFromUrl = (url) => {
|
|
|
5
5
|
throw new VError('invalid url')
|
|
6
6
|
}
|
|
7
7
|
const questionMarkIndex = url.indexOf('?')
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const path = questionMarkIndex === -1 ? url : url.slice(0, questionMarkIndex)
|
|
9
|
+
const slashIndex = path.lastIndexOf('/')
|
|
10
|
+
const pathType = path.slice(slashIndex + 1)
|
|
11
|
+
if (pathType) {
|
|
12
|
+
return pathType
|
|
13
|
+
}
|
|
14
|
+
if (questionMarkIndex !== -1) {
|
|
15
|
+
// deprecated
|
|
16
|
+
const searchParams = new URLSearchParams(url.slice(questionMarkIndex))
|
|
17
|
+
const queryType = searchParams.get('type')
|
|
18
|
+
if (queryType) {
|
|
19
|
+
return queryType
|
|
13
20
|
}
|
|
14
|
-
return rest
|
|
15
21
|
}
|
|
16
|
-
|
|
17
|
-
const rest = url.slice(questionMarkIndex)
|
|
18
|
-
const searchParams = new URLSearchParams(rest)
|
|
19
|
-
const type = searchParams.get('type')
|
|
20
|
-
return type
|
|
22
|
+
throw new Error('missing type parameter')
|
|
21
23
|
}
|
|
@@ -26,6 +26,9 @@ const getAllowedHosts = (headers) => {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export const isAllowedWebSocketOrigin = (request) => {
|
|
29
|
+
if (request.remoteAuthorityAuthenticated === true) {
|
|
30
|
+
return true
|
|
31
|
+
}
|
|
29
32
|
const { headers } = request
|
|
30
33
|
const origin = normalizeHeaderValue(getHeaderValue(headers, 'origin'))
|
|
31
34
|
if (!origin) {
|
|
@@ -8,6 +8,7 @@ export const Commands = {
|
|
|
8
8
|
definition: LanguageServer.definition,
|
|
9
9
|
diagnostic: LanguageServer.diagnostic,
|
|
10
10
|
dispose: LanguageServer.dispose,
|
|
11
|
+
disposeAll: LanguageServer.disposeAll,
|
|
11
12
|
format: LanguageServer.format,
|
|
12
13
|
references: LanguageServer.references,
|
|
13
14
|
}
|
|
@@ -218,6 +218,7 @@ export const getModuleId = (commandId) => {
|
|
|
218
218
|
case 'LanguageServer.definition':
|
|
219
219
|
case 'LanguageServer.diagnostic':
|
|
220
220
|
case 'LanguageServer.dispose':
|
|
221
|
+
case 'LanguageServer.disposeAll':
|
|
221
222
|
case 'LanguageServer.format':
|
|
222
223
|
case 'LanguageServer.references':
|
|
223
224
|
return ModuleId.LanguageServer
|
|
@@ -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.103.0'
|
|
65
65
|
|
|
66
|
-
export const commit = '
|
|
66
|
+
export const commit = '8afc276'
|
|
67
67
|
|
|
68
|
-
export const date = '2026-08-
|
|
68
|
+
export const date = '2026-08-16T11:12:26.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', '8afc276', 'packages', 'preload', 'dist', 'index.js')
|
|
6
6
|
}
|