@lvce-editor/shared-process 0.86.0 → 0.86.1
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.86.
|
|
3
|
+
"version": "0.86.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@lvce-editor/assert": "1.7.0",
|
|
21
21
|
"@lvce-editor/auth-process": "1.7.0",
|
|
22
|
-
"@lvce-editor/extension-host-helper-process": "0.86.
|
|
22
|
+
"@lvce-editor/extension-host-helper-process": "0.86.1",
|
|
23
23
|
"@lvce-editor/ipc": "16.2.0",
|
|
24
24
|
"@lvce-editor/json-rpc": "8.2.0",
|
|
25
25
|
"@lvce-editor/jsonc-parser": "1.5.0",
|
|
26
26
|
"@lvce-editor/pretty-error": "2.0.0",
|
|
27
27
|
"@lvce-editor/process-explorer": "3.8.0",
|
|
28
|
-
"@lvce-editor/rpc-registry": "9.
|
|
28
|
+
"@lvce-editor/rpc-registry": "9.32.0",
|
|
29
29
|
"@lvce-editor/verror": "1.7.0",
|
|
30
30
|
"is-object": "^1.0.2",
|
|
31
31
|
"xdg-basedir": "^5.1.0"
|
|
@@ -6,7 +6,25 @@ import * as Preferences from '../Preferences/Preferences.js'
|
|
|
6
6
|
import * as PreloadUrl from '../PreloadUrl/PreloadUrl.js'
|
|
7
7
|
import * as Screen from '../Screen/Screen.js'
|
|
8
8
|
|
|
9
|
+
const getValidatedAppUrl = (url) => {
|
|
10
|
+
if (typeof url !== 'string') {
|
|
11
|
+
throw new TypeError('Expected url to be a string')
|
|
12
|
+
}
|
|
13
|
+
const defaultUrl = new URL(DefaultUrl.defaultUrl)
|
|
14
|
+
const parsedUrl = new URL(url, defaultUrl)
|
|
15
|
+
const isAppUrl =
|
|
16
|
+
parsedUrl.protocol === defaultUrl.protocol &&
|
|
17
|
+
parsedUrl.host === defaultUrl.host &&
|
|
18
|
+
parsedUrl.username === defaultUrl.username &&
|
|
19
|
+
parsedUrl.password === defaultUrl.password
|
|
20
|
+
if (!isAppUrl) {
|
|
21
|
+
throw new TypeError('Only application URLs can be opened in an app window')
|
|
22
|
+
}
|
|
23
|
+
return parsedUrl.toString()
|
|
24
|
+
}
|
|
25
|
+
|
|
9
26
|
export const createAppWindow = async ({ preferences, parsedArgs, workingDirectory, url = DefaultUrl.defaultUrl, preloadUrl } ) => {
|
|
27
|
+
const validatedUrl = getValidatedAppUrl(url)
|
|
10
28
|
const { width, height } = await Screen.getBounds()
|
|
11
29
|
const windowOptions = await GetAppWindowOptions.getAppWindowOptions({
|
|
12
30
|
preferences,
|
|
@@ -15,7 +33,7 @@ export const createAppWindow = async ({ preferences, parsedArgs, workingDirector
|
|
|
15
33
|
preloadUrl,
|
|
16
34
|
})
|
|
17
35
|
const titleBarItems = GetTitleBarItems.getTitleBarItems()
|
|
18
|
-
return ParentIpc.invoke('AppWindow.createAppWindow', windowOptions, parsedArgs, workingDirectory, titleBarItems,
|
|
36
|
+
return ParentIpc.invoke('AppWindow.createAppWindow', windowOptions, parsedArgs, workingDirectory, titleBarItems, validatedUrl)
|
|
19
37
|
}
|
|
20
38
|
|
|
21
39
|
export const openNew = async (url) => {
|
|
@@ -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', '9283be4', 'extensions')
|
|
7
7
|
return builtinExtensionsPath
|
|
8
8
|
}
|
|
@@ -2,21 +2,16 @@ import * as IsLinux from '../IsLinux/IsLinux.js'
|
|
|
2
2
|
import * as IsProduction from '../IsProduction/IsProduction.js'
|
|
3
3
|
import * as IsWindows from '../IsWindows/IsWindows.js'
|
|
4
4
|
import * as Path from '../Path/Path.js'
|
|
5
|
-
import * as Platform from '../Platform/Platform.js'
|
|
6
5
|
import * as Root from '../Root/Root.js'
|
|
7
6
|
|
|
8
7
|
export const getIcon = () => {
|
|
9
|
-
if (
|
|
10
|
-
return
|
|
8
|
+
if (IsLinux.isLinux) {
|
|
9
|
+
return IsProduction.isProduction
|
|
10
|
+
? Path.join(Root.root, 'static', 'icons', 'icon.png')
|
|
11
|
+
: Path.join(Root.root, 'packages', 'build', 'files', 'icon.png')
|
|
11
12
|
}
|
|
12
13
|
if (!IsProduction.isProduction && IsWindows.isWindows) {
|
|
13
14
|
return Path.join(Root.root, 'packages', 'build', 'files', 'icon.png')
|
|
14
15
|
}
|
|
15
|
-
if (IsProduction.isProduction && Platform.isArchLinux) {
|
|
16
|
-
return Path.join(Root.root, 'static', 'icons', 'icon.png')
|
|
17
|
-
}
|
|
18
|
-
if (IsProduction.isProduction && Platform.isAppImage) {
|
|
19
|
-
return Path.join(Root.root, 'static', 'icons', 'icon.png')
|
|
20
|
-
}
|
|
21
16
|
return undefined
|
|
22
17
|
}
|
|
@@ -61,11 +61,11 @@ export const getSetupName = () => {
|
|
|
61
61
|
return 'Lvce-Setup'
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export const version = '0.86.
|
|
64
|
+
export const version = '0.86.1'
|
|
65
65
|
|
|
66
|
-
export const commit = '
|
|
66
|
+
export const commit = '9283be4'
|
|
67
67
|
|
|
68
|
-
export const date = '2026-07-
|
|
68
|
+
export const date = '2026-07-10T07:49:43.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', '9283be4', 'packages', 'preload', 'dist', 'index.js')
|
|
6
6
|
}
|