@lvce-editor/shared-process 0.37.8 → 0.37.10
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 +4 -4
- package/src/parts/ContentSecurityPolicyAboutWorker/ContentSecurityPolicyAboutWorker.js +2 -0
- package/src/parts/ExportStatic/ExportStatic.js +16 -10
- package/src/parts/GetHeaders/GetHeaders.js +3 -0
- package/src/parts/GetHeadersAboutWorker/GetHeadersAboutWorker.js +9 -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.37.
|
|
3
|
+
"version": "0.37.10",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@lvce-editor/assert": "^1.3.0",
|
|
21
|
-
"@lvce-editor/extension-host-helper-process": "0.37.
|
|
22
|
-
"@lvce-editor/ipc": "^11.0
|
|
23
|
-
"@lvce-editor/json-rpc": "^
|
|
21
|
+
"@lvce-editor/extension-host-helper-process": "0.37.10",
|
|
22
|
+
"@lvce-editor/ipc": "^11.1.0",
|
|
23
|
+
"@lvce-editor/json-rpc": "^5.0.0",
|
|
24
24
|
"@lvce-editor/jsonc-parser": "^1.5.0",
|
|
25
25
|
"@lvce-editor/pretty-error": "^1.6.0",
|
|
26
26
|
"@lvce-editor/verror": "^1.4.0",
|
|
@@ -367,6 +367,10 @@ const resolveServerStaticPath = (root) => {
|
|
|
367
367
|
if (existsSync(guessTwo)) {
|
|
368
368
|
return guessTwo;
|
|
369
369
|
}
|
|
370
|
+
const guessThree = Path.join(root, 'packages', 'server', 'node_modules', '@lvce-editor', 'server', 'static');
|
|
371
|
+
if (existsSync(guessThree)) {
|
|
372
|
+
return guessThree;
|
|
373
|
+
}
|
|
370
374
|
throw new Error(`server static path not found`);
|
|
371
375
|
};
|
|
372
376
|
/**
|
|
@@ -377,7 +381,7 @@ export const exportStatic = async ({ root, pathPrefix, extensionPath, testPath,
|
|
|
377
381
|
if (!existsSync(root)) {
|
|
378
382
|
throw new Error(`root path does not exist: ${root}`);
|
|
379
383
|
}
|
|
380
|
-
if (!existsSync(extensionPath)) {
|
|
384
|
+
if (extensionPath && !existsSync(extensionPath)) {
|
|
381
385
|
throw new Error(`extension path does not exist: ${extensionPath}`);
|
|
382
386
|
}
|
|
383
387
|
if (!serverStaticPath) {
|
|
@@ -405,15 +409,17 @@ export const exportStatic = async ({ root, pathPrefix, extensionPath, testPath,
|
|
|
405
409
|
serverStaticPath,
|
|
406
410
|
});
|
|
407
411
|
console.timeEnd('applyOverrides');
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
412
|
+
if (extensionPath) {
|
|
413
|
+
console.time('addExtension');
|
|
414
|
+
await addExtension({
|
|
415
|
+
extensionPath,
|
|
416
|
+
commitHash,
|
|
417
|
+
pathPrefix,
|
|
418
|
+
root,
|
|
419
|
+
useSimpleWebExtensionFile,
|
|
420
|
+
});
|
|
421
|
+
console.timeEnd('addExtension');
|
|
422
|
+
}
|
|
417
423
|
if (testPath) {
|
|
418
424
|
console.time('addTestFiles');
|
|
419
425
|
await addTestFiles({
|
|
@@ -10,6 +10,7 @@ import * as GetHeadersIframeWorker from '../GetHeadersIframeWorker/GetHeadersIfr
|
|
|
10
10
|
import * as GetHeadersMainFrame from '../GetHeadersMainFrame/GetHeadersMainFrame.js';
|
|
11
11
|
import * as GetHeadersOtherWorker from '../GetHeadersOtherWorker/GetHeadersOtherWorker.js';
|
|
12
12
|
import * as GetHeadersRendererWorker from '../GetHeadersRendererWorker/GetHeadersRendererWorker.js';
|
|
13
|
+
import * as GetHeadersAboutWorker from '../GetHeadersAboutWorker/GetHeadersAboutWorker.js';
|
|
13
14
|
import * as GetHeadersSearchWorker from '../GetHeadersSearchWorker/GetHeadersSearchWorker.js';
|
|
14
15
|
import * as GetHeadersSyntaxHighlightingWorker from '../GetHeadersSyntaxHighlightingWorker/GetHeadersSyntaxHighlightingWorker.js';
|
|
15
16
|
import * as GetHeadersTerminalWorker from '../GetHeadersTerminalWorker/GetHeadersTerminalWorker.js';
|
|
@@ -55,6 +56,8 @@ const getExtraHeaders = (pathName, fileExtension) => {
|
|
|
55
56
|
return GetHeadersFileSearchWorker.getHeadersFileSearchWorker();
|
|
56
57
|
case 'textSearchWorkerMain.js':
|
|
57
58
|
return GetHeadersTextSearchWorker.getHeadersFileSearchWorker();
|
|
59
|
+
case 'aboutWorkerMain.js':
|
|
60
|
+
return GetHeadersAboutWorker.getHeadersAboutWorker();
|
|
58
61
|
default:
|
|
59
62
|
if (pathName.endsWith('WorkerMain.js') || pathName.endsWith('WorkerMain.ts')) {
|
|
60
63
|
return GetHeadersOtherWorker.getHeadersOtherWorker(pathName);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as ContentSecurityPolicyAboutWorker from '../ContentSecurityPolicyAboutWorker/ContentSecurityPolicyAboutWorker.js';
|
|
2
|
+
import * as CrossOriginEmbedderPolicy from '../CrossOriginEmbedderPolicy/CrossOriginEmbedderPolicy.js';
|
|
3
|
+
import * as HttpHeader from '../HttpHeader/HttpHeader.js';
|
|
4
|
+
export const getHeadersAboutWorker = () => {
|
|
5
|
+
return {
|
|
6
|
+
[HttpHeader.CrossOriginEmbedderPolicy]: CrossOriginEmbedderPolicy.value,
|
|
7
|
+
[HttpHeader.ContentSecurityPolicy]: ContentSecurityPolicyAboutWorker.value,
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -41,9 +41,9 @@ export const getAppImageName = () => {
|
|
|
41
41
|
export const getSetupName = () => {
|
|
42
42
|
return 'Lvce-Setup';
|
|
43
43
|
};
|
|
44
|
-
export const version = '0.37.
|
|
45
|
-
export const commit = '
|
|
46
|
-
export const date = '2024-
|
|
44
|
+
export const version = '0.37.10';
|
|
45
|
+
export const commit = 'e33d39c';
|
|
46
|
+
export const date = '2024-11-01T09:27:12.000Z';
|
|
47
47
|
export const getVersion = () => {
|
|
48
48
|
return version;
|
|
49
49
|
};
|