@lvce-editor/shared-process 0.66.12 → 0.67.2
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 +0 -9
- package/src/parts/Exec/Exec.ipc.js +5 -0
- package/src/parts/Exec/Exec.js +6 -4
- package/src/parts/Module/Module.js +2 -0
- package/src/parts/ModuleId/ModuleId.js +1 -0
- package/src/parts/ModuleMap/ModuleMap.js +3 -0
- package/src/parts/Platform/Platform.ipc.js +1 -0
- package/src/parts/Platform/Platform.js +3 -3
- package/src/parts/PlatformPaths/PlatformPaths.ipc.js +1 -0
- package/src/parts/PlatformPaths/PlatformPaths.js +3 -0
- package/src/parts/GetGitpodPreviewUrl/GetGitpodPreviewUrl.js +0 -6
- package/src/parts/IsGitpod/IsGitpod.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.2",
|
|
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": ">=
|
|
17
|
+
"node": ">=22"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@lvce-editor/assert": "1.4.0",
|
|
21
|
-
"@lvce-editor/extension-host-helper-process": "0.
|
|
21
|
+
"@lvce-editor/extension-host-helper-process": "0.67.2",
|
|
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', '
|
|
5
|
+
const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '206fa4b', '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 = () => {
|
package/src/parts/Exec/Exec.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import * as childProcess from 'child_process';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
1
3
|
/**
|
|
2
4
|
*
|
|
3
|
-
* @param {string}
|
|
5
|
+
* @param {string} uri
|
|
4
6
|
* @param {string[]} args
|
|
5
|
-
* @param {import('execa').Options} options
|
|
6
7
|
* @returns
|
|
7
8
|
*/
|
|
8
|
-
export const exec = async (
|
|
9
|
-
|
|
9
|
+
export const exec = async (uri, args) => {
|
|
10
|
+
const path = fileURLToPath(uri);
|
|
11
|
+
childProcess.execFileSync(path, args);
|
|
10
12
|
};
|
|
@@ -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:
|
|
@@ -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':
|
|
@@ -8,6 +8,7 @@ export const Commands = {
|
|
|
8
8
|
getBuiltinExtensionsPath: PlatformPaths.getBuiltinExtensionsPath,
|
|
9
9
|
getCachedExtensionsPath: PlatformPaths.getCachedExtensionsPath,
|
|
10
10
|
getCacheDir: PlatformPaths.getCacheDir,
|
|
11
|
+
getCacheUri: PlatformPaths.getCacheUri,
|
|
11
12
|
getCommit: Platform.getCommit,
|
|
12
13
|
getConfigDir: PlatformPaths.getConfigDir,
|
|
13
14
|
getDataDir: PlatformPaths.getDataDir,
|
|
@@ -41,9 +41,9 @@ export const getAppImageName = () => {
|
|
|
41
41
|
export const getSetupName = () => {
|
|
42
42
|
return 'Lvce-Setup';
|
|
43
43
|
};
|
|
44
|
-
export const version = '0.
|
|
45
|
-
export const commit = '
|
|
46
|
-
export const date = '2025-11-
|
|
44
|
+
export const version = '0.67.2';
|
|
45
|
+
export const commit = '206fa4b';
|
|
46
|
+
export const date = '2025-11-19T22:06:04.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
|
};
|