@lvce-editor/shared-process 0.66.12 → 0.67.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.66.12",
3
+ "version": "0.67.0",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -14,11 +14,11 @@
14
14
  "directory": "packages/shared-process"
15
15
  },
16
16
  "engines": {
17
- "node": ">=18"
17
+ "node": ">=22"
18
18
  },
19
19
  "dependencies": {
20
20
  "@lvce-editor/assert": "1.4.0",
21
- "@lvce-editor/extension-host-helper-process": "0.66.12",
21
+ "@lvce-editor/extension-host-helper-process": "0.67.0",
22
22
  "@lvce-editor/ipc": "14.6.0",
23
23
  "@lvce-editor/json-rpc": "7.0.0",
24
24
  "@lvce-editor/jsonc-parser": "1.5.0",
@@ -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', '6109913', 'extensions');
5
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'a01bf62', 'extensions');
6
6
  return builtinExtensionsPath;
7
7
  };
@@ -1,13 +1,7 @@
1
1
  import * as GetContentSecurityPolicy from '../GetContentSecurityPolicy/GetContentSecurityPolicy.js';
2
- import * as GetGitpodPreviewUrl from '../GetGitpodPreviewUrl/GetGitpodPreviewUrl.js';
3
2
  import * as IsElectron from '../IsElectron/IsElectron.js';
4
- import * as IsGitpod from '../IsGitpod/IsGitpod.js';
5
3
  import * as Scheme from '../Scheme/Scheme.js';
6
4
  const getFrameSrc = () => {
7
- // TODO make ports configurable
8
- if (IsGitpod.isGitpod) {
9
- return [`frame-src 'self' ${GetGitpodPreviewUrl.getGitpodPreviewUrl(3001)} ${GetGitpodPreviewUrl.getGitpodPreviewUrl(3002)}`];
10
- }
11
5
  if (IsElectron.isElectron) {
12
6
  return [`frame-src ${Scheme.WebView}:`];
13
7
  }
@@ -20,9 +14,6 @@ const getManifestSrc = () => {
20
14
  return [`manifest-src 'self'`];
21
15
  };
22
16
  const getFrameAncestors = () => {
23
- if (IsGitpod.isGitpod) {
24
- return [`frame-ancestors *.gitpod.io`];
25
- }
26
17
  return [`frame-ancestors 'none'`];
27
18
  };
28
19
  const getSandbox = () => {
@@ -0,0 +1,5 @@
1
+ import * as Exec from './Exec.js';
2
+ export const name = 'Exec';
3
+ export const Commands = {
4
+ exec: Exec.exec,
5
+ };
@@ -1,10 +1,10 @@
1
+ import * as childProcess from 'child_process';
1
2
  /**
2
3
  *
3
4
  * @param {string} command
4
5
  * @param {string[]} args
5
- * @param {import('execa').Options} options
6
6
  * @returns
7
7
  */
8
- export const exec = async (command, args, options) => {
9
- throw new Error('deprecated');
8
+ export const exec = async (command, args) => {
9
+ childProcess.execFileSync(command, args);
10
10
  };
@@ -13,6 +13,8 @@ export const load = (moduleId) => {
13
13
  return import('../AutoUpdaterWindowsNsis/AutoUpdaterWindowsNsis.ipc.js');
14
14
  case ModuleId.BulkReplacement:
15
15
  return import('../BulkReplacement/BulkReplacement.ipc.js');
16
+ case ModuleId.Exec:
17
+ return import('../Exec/Exec.ipc.js');
16
18
  case ModuleId.ClipBoard:
17
19
  return import('../ClipBoard/ClipBoard.ipc.js');
18
20
  case ModuleId.Crash:
@@ -74,3 +74,4 @@ export const FileSystemDisk = 79;
74
74
  export const HandleRequest = 80;
75
75
  export const HandleMessagePortForFileSystemProcess = 81;
76
76
  export const HandleMessagePortForClipBoardProcess = 82;
77
+ export const Exec = 83;
@@ -185,12 +185,15 @@ export const getModuleId = (commandId) => {
185
185
  return ModuleId.Performance;
186
186
  case 'GetWindowId.getWindowId':
187
187
  return ModuleId.GetWindowId;
188
+ case 'Exec.exec':
189
+ return ModuleId.Exec;
188
190
  case 'Platform.getAppDir':
189
191
  case 'Platform.getArch':
190
192
  case 'Platform.getApplicationName':
191
193
  case 'Platform.getBuiltinExtensionsPath':
192
194
  case 'Platform.getCachedExtensionsPath':
193
195
  case 'Platform.getCacheDir':
196
+ case 'Platform.getCacheUri':
194
197
  case 'Platform.getCommit':
195
198
  case 'Platform.getRoot':
196
199
  case 'Platform.getRootUri':
@@ -41,9 +41,9 @@ export const getAppImageName = () => {
41
41
  export const getSetupName = () => {
42
42
  return 'Lvce-Setup';
43
43
  };
44
- export const version = '0.66.12';
45
- export const commit = '6109913';
46
- export const date = '2025-11-15T23:32:44.000Z';
44
+ export const version = '0.67.0';
45
+ export const commit = 'a01bf62';
46
+ export const date = '2025-11-16T20:16:00.000Z';
47
47
  export const getVersion = () => {
48
48
  return version;
49
49
  };
@@ -5,6 +5,7 @@ export const Commands = {
5
5
  getBuiltinExtensionsPath: PlatformPaths.getBuiltinExtensionsPath,
6
6
  getCachedExtensionsPath: PlatformPaths.getCachedExtensionsPath,
7
7
  getCacheDir: PlatformPaths.getCacheDir,
8
+ getCacheUri: PlatformPaths.getCacheUri,
8
9
  getConfigDir: PlatformPaths.getConfigDir,
9
10
  getDataDir: PlatformPaths.getDataDir,
10
11
  getDisabledExtensionsPath: PlatformPaths.getDisabledExtensionsPath,
@@ -99,6 +99,9 @@ export const getAppDir = () => {
99
99
  export const getCacheDir = () => {
100
100
  return cacheDir;
101
101
  };
102
+ export const getCacheUri = () => {
103
+ return pathToFileURL(cacheDir).toString();
104
+ };
102
105
  export const getConfigDir = () => {
103
106
  return configDir;
104
107
  };
@@ -1,6 +0,0 @@
1
- export const getGitpodPreviewUrl = (port) => {
2
- const workspaceId = process.env.GITPOD_WORKSPACE_ID;
3
- const cluster = process.env.GITPOD_WORKSPACE_CLUSTER_HOST;
4
- const url = `https://${port}-${workspaceId}.${cluster}`;
5
- return url;
6
- };
@@ -1,2 +0,0 @@
1
- import * as Env from '../Env/Env.js';
2
- export const isGitpod = Boolean(Env.env.GITPOD_WORKSPACE_ID);