@lvce-editor/shared-process 0.97.19 → 0.97.21
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/GetElectronFileResponse/GetElectronFileResponse.js +2 -2
- package/src/parts/GetElectronFileResponseContent/GetElectronFileResponseContent.js +2 -3
- package/src/parts/IsDocumentNavigation/IsDocumentNavigation.js +4 -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.97.
|
|
3
|
+
"version": "0.97.21",
|
|
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.97.
|
|
21
|
+
"@lvce-editor/extension-host-helper-process": "0.97.21",
|
|
22
22
|
"@lvce-editor/ipc": "16.10.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', 'e4aec39', 'extensions')
|
|
7
7
|
return builtinExtensionsPath
|
|
8
8
|
}
|
|
@@ -10,6 +10,7 @@ import * as GetPathEtag from '../GetPathEtag/GetPathEtag.js'
|
|
|
10
10
|
import * as GetServerErrorResponse from '../GetServerErrorResponse/GetServerErrorResponse.js'
|
|
11
11
|
import * as GetTypeScriptSyntaxErrorResponse from '../GetTypeScriptSyntaxErrorResponse/GetTypeScriptSyntaxErrorResponse.js'
|
|
12
12
|
import * as HttpHeader from '../HttpHeader/HttpHeader.js'
|
|
13
|
+
import * as IsDocumentNavigation from '../IsDocumentNavigation/IsDocumentNavigation.js'
|
|
13
14
|
import * as IsEnoentError from '../IsEnoentError/IsEnoentError.js'
|
|
14
15
|
import * as IsTypeScriptSyntaxError from '../IsTypeScriptSyntaxError/IsTypeScriptSyntaxError.js'
|
|
15
16
|
import * as Logger from '../Logger/Logger.js'
|
|
@@ -24,9 +25,8 @@ export const resolveElectronFileUri = (url) => {
|
|
|
24
25
|
// maybe send webview requests directly to preview process
|
|
25
26
|
export const getElectronFileResponse = async (url, request) => {
|
|
26
27
|
try {
|
|
27
|
-
const fetchDestination = request?.headers?.['sec-fetch-dest']
|
|
28
28
|
const isRootDocument = url === '/' || url.startsWith('/?')
|
|
29
|
-
const isSecretDocument = isRootDocument &&
|
|
29
|
+
const isSecretDocument = isRootDocument && IsDocumentNavigation.isDocumentNavigation(request)
|
|
30
30
|
const pathName = GetElectronFileResponseRelativePath.getElectronFileResponseRelativePath(url)
|
|
31
31
|
let absolutePath = GetElectronFileResponseAbsolutePath.getElectronFileResponseAbsolutePath(pathName)
|
|
32
32
|
let etag
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises'
|
|
2
2
|
import * as AddCustomPathsToIndexHtml from '../AddCustomPathsToIndexHtml/AddCustomPathsToIndexHtml.js'
|
|
3
|
+
import * as IsDocumentNavigation from '../IsDocumentNavigation/IsDocumentNavigation.js'
|
|
3
4
|
import * as Platform from '../Platform/Platform.js'
|
|
4
5
|
import * as ShouldTranspileTypescript from '../ShouldTranspileTypescript/ShouldTranspileTypescript.js'
|
|
5
6
|
import * as TranspileTypeScript from '../TranspileTypeScript/TranspileTypeScript.js'
|
|
@@ -25,9 +26,7 @@ export const getElectronFileResponseContent = async (request, absolutePath, url)
|
|
|
25
26
|
content = await AddCustomPathsToIndexHtml.addCustomPathsToIndexHtml(content)
|
|
26
27
|
}
|
|
27
28
|
if (url === '/' || url.startsWith('/?')) {
|
|
28
|
-
const
|
|
29
|
-
const isDocumentNavigation = fetchDestination === 'document'
|
|
30
|
-
const additionalConfig = isDocumentNavigation ? { webSocketIssuer: WebSocketIssuerRegistry.create() } : {}
|
|
29
|
+
const additionalConfig = IsDocumentNavigation.isDocumentNavigation(request) ? { webSocketIssuer: WebSocketIssuerRegistry.create() } : {}
|
|
31
30
|
content = await AddCustomPathsToIndexHtml.addCustomPathsToIndexHtml(content, additionalConfig)
|
|
32
31
|
}
|
|
33
32
|
if (typeof content === 'string') {
|
|
@@ -61,11 +61,11 @@ export const getSetupName = () => {
|
|
|
61
61
|
return 'Lvce-Setup'
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export const version = '0.97.
|
|
64
|
+
export const version = '0.97.21'
|
|
65
65
|
|
|
66
|
-
export const commit = '
|
|
66
|
+
export const commit = 'e4aec39'
|
|
67
67
|
|
|
68
|
-
export const date = '2026-08-
|
|
68
|
+
export const date = '2026-08-03T21:46:37.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', 'e4aec39', 'packages', 'preload', 'dist', 'index.js')
|
|
6
6
|
}
|