@lvce-editor/test-worker 7.6.0 → 7.7.0

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.
@@ -2543,6 +2543,14 @@ const getFileMapWeb = async url => {
2543
2543
  return fileMap;
2544
2544
  };
2545
2545
 
2546
+ const loadFixtureToMemFs = async fileMap => {
2547
+ for (const [path, content] of Object.entries(fileMap)) {
2548
+ const memfsPath = `memfs:///fixture/${path}`;
2549
+ await invoke$1('FileSystem.writeFile', memfsPath, content);
2550
+ }
2551
+ return `memfs:///fixture`;
2552
+ };
2553
+
2546
2554
  const Backslash = '\\';
2547
2555
  const Slash$1 = '/';
2548
2556
 
@@ -2634,10 +2642,8 @@ const loadFixture = async (platform, url) => {
2634
2642
  }
2635
2643
  const fn = platform === Web ? getFileMapWeb : getFileMapNode;
2636
2644
  const fileMap = await fn(url);
2637
- for (const [key, value] of Object.entries(fileMap)) {
2638
- await writeFile(`memfs:///${key}`, value);
2639
- }
2640
- return 'memfs://';
2645
+ const filePath = await loadFixtureToMemFs(fileMap);
2646
+ return filePath;
2641
2647
  };
2642
2648
 
2643
2649
  const FileSystem = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "7.6.0",
3
+ "version": "7.7.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",