@lvce-editor/shared-process 0.61.4 → 0.61.5
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.61.
|
|
3
|
+
"version": "0.61.5",
|
|
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.4.0",
|
|
21
|
-
"@lvce-editor/extension-host-helper-process": "0.61.
|
|
21
|
+
"@lvce-editor/extension-host-helper-process": "0.61.5",
|
|
22
22
|
"@lvce-editor/ipc": "14.5.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', '98093b2', 'extensions');
|
|
6
6
|
return builtinExtensionsPath;
|
|
7
7
|
};
|
|
@@ -384,11 +384,50 @@ const transpileFiles = async (folder) => {
|
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
|
+
export const createFilemap = async (fixturesPath) => {
|
|
388
|
+
const filemap = {};
|
|
389
|
+
const dirents = await readdir(fixturesPath, { withFileTypes: true, recursive: true });
|
|
390
|
+
for (const dirent of dirents) {
|
|
391
|
+
if (dirent.isFile()) {
|
|
392
|
+
// Calculate relative path by removing the fixturesPath prefix from parentPath
|
|
393
|
+
const fullPath = join(dirent.parentPath, dirent.name);
|
|
394
|
+
let relativeFilePath;
|
|
395
|
+
if (dirent.parentPath === fixturesPath) {
|
|
396
|
+
relativeFilePath = dirent.name;
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
// Manually calculate relative path for cross-platform compatibility
|
|
400
|
+
// Remove the fixturesPath prefix from parentPath and normalize separators
|
|
401
|
+
const normalizedFixturesPath = fixturesPath.replace(/\\/g, '/');
|
|
402
|
+
const normalizedParentPath = dirent.parentPath.replace(/\\/g, '/');
|
|
403
|
+
const relativeDir = normalizedParentPath.replace(normalizedFixturesPath + '/', '');
|
|
404
|
+
relativeFilePath = join(relativeDir, dirent.name);
|
|
405
|
+
}
|
|
406
|
+
const content = await FileSystem.readFile(fullPath);
|
|
407
|
+
filemap[relativeFilePath] = content;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
return filemap;
|
|
411
|
+
};
|
|
412
|
+
export const createFilemapsPerFixture = async (fixturesPath) => {
|
|
413
|
+
const dirents = await readdir(fixturesPath, { withFileTypes: true });
|
|
414
|
+
const fixtureDirectories = dirents.filter(dirent => dirent.isDirectory());
|
|
415
|
+
// Create filemaps in parallel
|
|
416
|
+
await Promise.all(fixtureDirectories.map(async (dirent) => {
|
|
417
|
+
const fixturePath = join(fixturesPath, dirent.name);
|
|
418
|
+
const filemap = await createFilemap(fixturePath);
|
|
419
|
+
// Create fileMap.json in the fixture directory
|
|
420
|
+
const fileMapPath = join(fixturePath, 'fileMap.json');
|
|
421
|
+
await FileSystem.writeFile(fileMapPath, JSON.stringify(filemap, null, 2));
|
|
422
|
+
}));
|
|
423
|
+
};
|
|
387
424
|
const addTestFiles = async ({ testPath, commitHash, root, pathPrefix }) => {
|
|
388
425
|
const testRoot = isAbsolute(testPath) ? testPath : join(root, testPath);
|
|
389
426
|
await FileSystem.copy(`${testRoot}/src`, `${root}/dist/${commitHash}/packages/extension-host-worker-tests/src`);
|
|
390
427
|
if (existsSync(`${testRoot}/fixtures`)) {
|
|
391
428
|
await FileSystem.copy(`${testRoot}/fixtures`, `${root}/dist/${commitHash}/packages/extension-host-worker-tests/fixtures`);
|
|
429
|
+
// Create fileMap.json for each fixture directory
|
|
430
|
+
await createFilemapsPerFixture(`${root}/dist/${commitHash}/packages/extension-host-worker-tests/fixtures`);
|
|
392
431
|
}
|
|
393
432
|
const distDirentsPath = `${root}/dist/${commitHash}/packages/extension-host-worker-tests/src`;
|
|
394
433
|
await transpileFiles(distDirentsPath);
|
|
@@ -41,9 +41,9 @@ export const getAppImageName = () => {
|
|
|
41
41
|
export const getSetupName = () => {
|
|
42
42
|
return 'Lvce-Setup';
|
|
43
43
|
};
|
|
44
|
-
export const version = '0.61.
|
|
45
|
-
export const commit = '
|
|
46
|
-
export const date = '2025-09-
|
|
44
|
+
export const version = '0.61.5';
|
|
45
|
+
export const commit = '98093b2';
|
|
46
|
+
export const date = '2025-09-21T19:22:07.000Z';
|
|
47
47
|
export const getVersion = () => {
|
|
48
48
|
return version;
|
|
49
49
|
};
|