@lvce-editor/shared-process 0.84.2 → 0.84.4

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.84.2",
3
+ "version": "0.84.4",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -19,7 +19,7 @@
19
19
  "dependencies": {
20
20
  "@lvce-editor/assert": "1.5.1",
21
21
  "@lvce-editor/auth-process": "1.6.0",
22
- "@lvce-editor/extension-host-helper-process": "0.84.2",
22
+ "@lvce-editor/extension-host-helper-process": "0.84.4",
23
23
  "@lvce-editor/ipc": "16.0.0",
24
24
  "@lvce-editor/json-rpc": "8.0.0",
25
25
  "@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', '751db1a', 'extensions');
5
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'c37f508', 'extensions');
6
6
  return builtinExtensionsPath;
7
7
  };
@@ -383,7 +383,7 @@ const isTestFile = (file) => {
383
383
  return file.endsWith('.js') || file.endsWith('.ts');
384
384
  };
385
385
  const getTestFiles = (testFilesRaw) => {
386
- return testFilesRaw.map(getName).filter(isTestFile);
386
+ return testFilesRaw.filter(isTestFile).map(getName);
387
387
  };
388
388
  const transpileFile = (typescript, content) => {
389
389
  const result = typescript.transpileModule(content, {
@@ -458,13 +458,19 @@ const addTestFiles = async ({ testPath, commitHash, root, pathPrefix }) => {
458
458
  await transpileFiles(distDirentsPath);
459
459
  const testFilesRaw = await FileSystem.readDir(`${testRoot}/src`);
460
460
  const testFiles = getTestFiles(testFilesRaw);
461
- await FileSystem.mkdir(`${root}/dist/${commitHash}/tests`);
462
- await FileSystem.mkdir(`${root}/dist/tests`);
461
+ const hashTestsPath = `${root}/dist/${commitHash}/tests`;
462
+ const rootTestsPath = `${root}/dist/tests`;
463
+ await FileSystem.mkdir(hashTestsPath);
464
+ await FileSystem.mkdir(rootTestsPath);
465
+ await FileSystem.copyFile(`${root}/dist/index.html`, `${hashTestsPath}/_all.html`);
466
+ await FileSystem.copyFile(`${root}/dist/index.html`, `${rootTestsPath}/_all.html`);
463
467
  for (const testFile of testFiles) {
464
- await FileSystem.copyFile(`${root}/dist/index.html`, `${root}/dist/tests/${testFile}.html`);
468
+ await FileSystem.copyFile(`${root}/dist/index.html`, `${hashTestsPath}/${testFile}.html`);
469
+ await FileSystem.copyFile(`${root}/dist/index.html`, `${rootTestsPath}/${testFile}.html`);
465
470
  }
466
471
  const testOverviewHtml = generateTestOverviewHtml(testFiles);
467
- await FileSystem.writeFile(`${root}/dist/tests/index.html`, testOverviewHtml);
472
+ await FileSystem.writeFile(`${hashTestsPath}/index.html`, testOverviewHtml);
473
+ await FileSystem.writeFile(`${rootTestsPath}/index.html`, testOverviewHtml);
468
474
  };
469
475
  const resolveServerStaticPath = (root) => {
470
476
  const guessOne = Path.join(root, 'node_modules', '@lvce-editor', 'server', 'static');
@@ -16,6 +16,18 @@ import * as Logger from '../Logger/Logger.js';
16
16
  export const getTestRequestResponse = async (request, indexHtmlPath) => {
17
17
  try {
18
18
  const pathName = GetPathName.getPathName(request);
19
+ if (pathName === '/tests/_all.html') {
20
+ const body = await readFile(indexHtmlPath, 'utf8');
21
+ const content = await AddCustomPathsToIndexHtml.addCustomPathsToIndexHtml(body);
22
+ const headers = {
23
+ [HttpHeader.CrossOriginEmbedderPolicy]: CrossOriginEmbedderPolicy.value,
24
+ [HttpHeader.CrossOriginOpenerPolicy]: CrossOriginOpenerPolicy.value,
25
+ [HttpHeader.CrossOriginResourcePolicy]: CrossOriginResourcePolicy.value,
26
+ [HttpHeader.ContentSecurityPolicy]: ContentSecurityPolicyDocument.value,
27
+ [HttpHeader.ContentType]: 'text/html',
28
+ };
29
+ return GetContentResponse.getContentResponse(content, headers);
30
+ }
19
31
  if (pathName.endsWith('.html')) {
20
32
  const body = await readFile(indexHtmlPath, 'utf8');
21
33
  const content = await AddCustomPathsToIndexHtml.addCustomPathsToIndexHtml(body);
@@ -41,9 +41,9 @@ export const getAppImageName = () => {
41
41
  export const getSetupName = () => {
42
42
  return 'Lvce-Setup';
43
43
  };
44
- export const version = '0.84.2';
45
- export const commit = '751db1a';
46
- export const date = '2026-06-19T13:38:58.000Z';
44
+ export const version = '0.84.4';
45
+ export const commit = 'c37f508';
46
+ export const date = '2026-06-21T22:03:47.000Z';
47
47
  export const getVersion = () => {
48
48
  return version;
49
49
  };
@@ -1,5 +1,5 @@
1
1
  import { join } from 'node:path';
2
2
  import * as Root from '../Root/Root.js';
3
3
  export const getPreloadUrl = () => {
4
- return join(Root.root, 'static', '751db1a', 'packages', 'preload', 'dist', 'index.js');
4
+ return join(Root.root, 'static', 'c37f508', 'packages', 'preload', 'dist', 'index.js');
5
5
  };