@lvce-editor/shared-process 0.41.7 → 0.41.8
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/FileSystem/FileSystem.ipc.js +1 -0
- package/src/parts/FileSystem/FileSystem.js +10 -0
- package/src/parts/GetWebViewsFromExtensions/GetWebViewsFromExtensions.js +3 -0
- package/src/parts/ModuleMap/ModuleMap.js +1 -0
- package/src/parts/Platform/Platform.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.8",
|
|
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.3.0",
|
|
21
|
-
"@lvce-editor/extension-host-helper-process": "0.41.
|
|
21
|
+
"@lvce-editor/extension-host-helper-process": "0.41.8",
|
|
22
22
|
"@lvce-editor/ipc": "^12.2.0",
|
|
23
23
|
"@lvce-editor/json-rpc": "^5.4.0",
|
|
24
24
|
"@lvce-editor/jsonc-parser": "^1.5.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@lvce-editor/embeds-process": "^1.6.0",
|
|
33
33
|
"@lvce-editor/network-process": "^2.1.0",
|
|
34
34
|
"@lvce-editor/preload": "^1.4.0",
|
|
35
|
-
"@lvce-editor/preview-process": "^
|
|
35
|
+
"@lvce-editor/preview-process": "^5.1.0",
|
|
36
36
|
"@lvce-editor/pty-host": "^3.0.0",
|
|
37
37
|
"@lvce-editor/search-process": "^4.0.1",
|
|
38
38
|
"@lvce-editor/typescript-compile-process": "^2.1.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', '430cfb3', 'extensions');
|
|
6
6
|
return builtinExtensionsPath;
|
|
7
7
|
};
|
|
@@ -11,6 +11,7 @@ import * as Path from '../Path/Path.js';
|
|
|
11
11
|
import * as Platform from '../Platform/Platform.js';
|
|
12
12
|
import * as Trash from '../Trash/Trash.js';
|
|
13
13
|
import { VError } from '../VError/VError.js';
|
|
14
|
+
import { fileURLToPath } from 'node:url';
|
|
14
15
|
export const state = {
|
|
15
16
|
watcherMap: Object.create(null),
|
|
16
17
|
};
|
|
@@ -304,3 +305,12 @@ export const cp = async (from, to) => {
|
|
|
304
305
|
// }
|
|
305
306
|
// TODO ui should show useful error message when file cannot be saved
|
|
306
307
|
// and for permission denied error it should use that npm module that allows root
|
|
308
|
+
export const getRealUri = (pathOrUri) => {
|
|
309
|
+
try {
|
|
310
|
+
const uri = fileURLToPath(pathOrUri).toString();
|
|
311
|
+
return uri;
|
|
312
|
+
}
|
|
313
|
+
catch {
|
|
314
|
+
return pathOrUri;
|
|
315
|
+
}
|
|
316
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
2
|
import * as GetRemoteUrl from '../GetRemoteUrl/GetRemoteUrl.js';
|
|
3
|
+
import { pathToFileURL } from 'node:url';
|
|
3
4
|
export const getWebViewsFromExtensions = (extensions) => {
|
|
4
5
|
const webViews = [];
|
|
5
6
|
for (const extension of extensions) {
|
|
@@ -9,10 +10,12 @@ export const getWebViewsFromExtensions = (extensions) => {
|
|
|
9
10
|
if (webView && webView.path) {
|
|
10
11
|
path = join(extension.path, webView.path);
|
|
11
12
|
}
|
|
13
|
+
const uri = pathToFileURL(path).toString();
|
|
12
14
|
const remotePath = GetRemoteUrl.getRemoteUrl(path);
|
|
13
15
|
webViews.push({
|
|
14
16
|
...webView,
|
|
15
17
|
path,
|
|
18
|
+
uri,
|
|
16
19
|
remotePath,
|
|
17
20
|
});
|
|
18
21
|
}
|
|
@@ -136,6 +136,7 @@ export const getModuleId = (commandId) => {
|
|
|
136
136
|
case 'FileSystem.createFolder':
|
|
137
137
|
case 'FileSystem.ensureFile':
|
|
138
138
|
case 'FileSystem.getPathSeparator':
|
|
139
|
+
case 'FileSystem.getRealUri':
|
|
139
140
|
case 'FileSystem.mkdir':
|
|
140
141
|
case 'FileSystem.readDirWithFileTypes':
|
|
141
142
|
case 'FileSystem.readFile':
|
|
@@ -41,9 +41,9 @@ export const getAppImageName = () => {
|
|
|
41
41
|
export const getSetupName = () => {
|
|
42
42
|
return 'Lvce-Setup';
|
|
43
43
|
};
|
|
44
|
-
export const version = '0.41.
|
|
45
|
-
export const commit = '
|
|
46
|
-
export const date = '2024-12-
|
|
44
|
+
export const version = '0.41.8';
|
|
45
|
+
export const commit = '430cfb3';
|
|
46
|
+
export const date = '2024-12-22T11:35:16.000Z';
|
|
47
47
|
export const getVersion = () => {
|
|
48
48
|
return version;
|
|
49
49
|
};
|