@lvce-editor/shared-process 0.70.8 → 0.70.11

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/index.js CHANGED
@@ -1,7 +1,6 @@
1
- import { dirname, isAbsolute, join } from 'node:path'
2
- import { fileURLToPath } from 'node:url'
1
+ import { isAbsolute, join } from 'node:path'
3
2
 
4
- const __dirname = dirname(fileURLToPath(import.meta.url))
3
+ const __dirname = import.meta.dirname
5
4
 
6
5
  export const sharedProcessPath = join(__dirname, 'src', 'sharedProcessMain.js')
7
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.70.8",
3
+ "version": "0.70.11",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -14,16 +14,16 @@
14
14
  "directory": "packages/shared-process"
15
15
  },
16
16
  "engines": {
17
- "node": ">=22"
17
+ "node": ">=24"
18
18
  },
19
19
  "dependencies": {
20
20
  "@lvce-editor/assert": "1.5.1",
21
- "@lvce-editor/extension-host-helper-process": "0.70.8",
21
+ "@lvce-editor/extension-host-helper-process": "0.70.11",
22
22
  "@lvce-editor/ipc": "14.7.0",
23
23
  "@lvce-editor/json-rpc": "7.0.0",
24
24
  "@lvce-editor/jsonc-parser": "1.5.0",
25
25
  "@lvce-editor/pretty-error": "2.0.0",
26
- "@lvce-editor/rpc-registry": "6.4.0",
26
+ "@lvce-editor/rpc-registry": "6.5.0",
27
27
  "@lvce-editor/verror": "1.7.0",
28
28
  "is-object": "^1.0.2",
29
29
  "xdg-basedir": "^5.1.0"
@@ -3,14 +3,21 @@ import * as GetAppWindowOptions from '../GetAppWindowOptions/GetAppWindowOptions
3
3
  import * as GetTitleBarItems from '../GetTitleBarItems/GetTitleBarItems.js';
4
4
  import * as ParentIpc from '../MainProcess/MainProcess.js';
5
5
  import * as Preferences from '../Preferences/Preferences.js';
6
+ import * as PreloadUrl from '../PreloadUrl/PreloadUrl.js';
6
7
  import * as Screen from '../Screen/Screen.js';
7
- export const createAppWindow = async (preferences, parsedArgs, workingDirectory, url = DefaultUrl.defaultUrl) => {
8
+ export const createAppWindow = async ({ preferences, parsedArgs, workingDirectory, url = DefaultUrl.defaultUrl, preloadUrl }) => {
8
9
  const { width, height } = await Screen.getBounds();
9
- const windowOptions = GetAppWindowOptions.getAppWindowOptions(preferences, width, height);
10
+ const windowOptions = GetAppWindowOptions.getAppWindowOptions({
11
+ preferences,
12
+ screenWidth: width,
13
+ screenHeight: height,
14
+ preloadUrl,
15
+ });
10
16
  const titleBarItems = GetTitleBarItems.getTitleBarItems();
11
17
  return ParentIpc.invoke('AppWindow.createAppWindow', windowOptions, parsedArgs, workingDirectory, titleBarItems, url);
12
18
  };
13
19
  export const openNew = async (url) => {
14
20
  const preferences = await Preferences.getAll();
15
- return createAppWindow(preferences, [], '', url);
21
+ const preloadUrl = PreloadUrl.getPreloadUrl();
22
+ return createAppWindow({ preferences, parsedArgs: [], workingDirectory: '', url, preloadUrl });
16
23
  };
@@ -2,6 +2,6 @@ import { join } from 'path';
2
2
  import { fileURLToPath } from 'url';
3
3
  export const getBuiltinExtensionsPath = () => {
4
4
  const staticServerPath = fileURLToPath(import.meta.resolve('@lvce-editor/static-server'));
5
- const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '41fc2a2', 'extensions');
5
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '7177c9a', 'extensions');
6
6
  return builtinExtensionsPath;
7
7
  };
@@ -7,7 +7,7 @@ import * as GetProcessExplorerUrl from '../GetProcessExplorerUrl/GetProcessExplo
7
7
  import * as ParentIpc from '../MainProcess/MainProcess.js';
8
8
  const getOptions = async (colorThemeJson) => {
9
9
  const backgroundColor = colorThemeJson.MainBackground;
10
- const preload = PreloadUrl.preloadUrl;
10
+ const preload = PreloadUrl.getPreloadUrl();
11
11
  const options = {
12
12
  width: 800,
13
13
  height: 500,
@@ -1,6 +1,6 @@
1
1
  import * as GetBrowserWindowOptions from '../GetBrowserWindowOptions/GetBrowserWindowOptions.js';
2
2
  import * as Platform from '../Platform/Platform.js';
3
- export const getAppWindowOptions = (preferences, screenWidth, screenHeight) => {
3
+ export const getAppWindowOptions = ({ preferences, screenWidth, screenHeight, preloadUrl }) => {
4
4
  const titleBarPreference = preferences['window.titleBarStyle'];
5
5
  const frame = titleBarPreference !== 'custom';
6
6
  const titleBarStyle = titleBarPreference === 'custom' ? 'hidden' : undefined;
@@ -23,5 +23,6 @@ export const getAppWindowOptions = (preferences, screenWidth, screenHeight) => {
23
23
  titleBarStyle,
24
24
  frame,
25
25
  titleBarOverlay,
26
+ preloadUrl,
26
27
  });
27
28
  };
@@ -1,11 +1,10 @@
1
1
  import * as BrowserWindowV8CacheOptions from '../BrowserWindowV8CacheOptions/BrowserWindowV8CacheOptions.js';
2
2
  import * as GetIcon from '../GetIcon/GetIcon.js';
3
- import * as PreloadUrl from '../PreloadUrl/PreloadUrl.js';
4
3
  /**
5
4
  *
6
5
  * @returns {any}
7
6
  */
8
- export const getBrowserWindowOptions = ({ x, y, width, height, titleBarStyle, titleBarOverlay, frame, background }) => {
7
+ export const getBrowserWindowOptions = ({ x, y, width, height, titleBarStyle, titleBarOverlay, frame, background, preloadUrl }) => {
9
8
  const icon = GetIcon.getIcon();
10
9
  return {
11
10
  x,
@@ -22,7 +21,7 @@ export const getBrowserWindowOptions = ({ x, y, width, height, titleBarStyle, ti
22
21
  sandbox: true,
23
22
  contextIsolation: true,
24
23
  v8CacheOptions: BrowserWindowV8CacheOptions.browserWindowV8CacheOptions,
25
- preload: PreloadUrl.preloadUrl,
24
+ preload: preloadUrl,
26
25
  additionalArguments: [],
27
26
  },
28
27
  backgroundColor: background,
@@ -1,9 +1,11 @@
1
1
  import * as AppWindow from '../AppWindow/AppWindow.js';
2
2
  import * as Assert from '../Assert/Assert.js';
3
3
  import * as Preferences from '../Preferences/Preferences.js';
4
+ import * as PreloadUrl from '../PreloadUrl/PreloadUrl.js';
4
5
  export const handleElectronReady = async (parsedArgs, workingDirectory) => {
5
6
  Assert.object(parsedArgs);
6
7
  Assert.string(workingDirectory);
7
8
  const preferences = await Preferences.getAll();
8
- await AppWindow.createAppWindow(preferences, parsedArgs, workingDirectory);
9
+ const preloadUrl = PreloadUrl.getPreloadUrl();
10
+ await AppWindow.createAppWindow({ preferences, parsedArgs, workingDirectory, preloadUrl });
9
11
  };
@@ -41,9 +41,9 @@ export const getAppImageName = () => {
41
41
  export const getSetupName = () => {
42
42
  return 'Lvce-Setup';
43
43
  };
44
- export const version = '0.70.8';
45
- export const commit = '41fc2a2';
46
- export const date = '2026-01-08T22:31:03.000Z';
44
+ export const version = '0.70.11';
45
+ export const commit = '7177c9a';
46
+ export const date = '2026-01-09T23:00:18.000Z';
47
47
  export const getVersion = () => {
48
48
  return version;
49
49
  };
@@ -1,3 +1,5 @@
1
1
  import { join } from 'node:path';
2
2
  import * as Root from '../Root/Root.js';
3
- export const preloadUrl = join(Root.root, 'packages', 'shared-process', 'node_modules', '@lvce-editor', 'preload', 'src', 'index.js');
3
+ export const getPreloadUrl = () => {
4
+ return join(Root.root, 'packages', 'preload', 'dist', 'index.js');
5
+ };