@lvce-editor/test-worker 7.5.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.
package/dist/api.d.ts CHANGED
@@ -493,6 +493,7 @@ interface SourceControl {
493
493
  readonly handleClickSourceControlButtons: (index: number, name: string) => Promise<void>;
494
494
  readonly handleInput: (text: string) => Promise<void>;
495
495
  readonly selectIndex: (index: number) => Promise<void>;
496
+ readonly show: () => Promise<void>;
496
497
  }
497
498
 
498
499
  interface StatusBar {
@@ -1591,7 +1591,7 @@ const {
1591
1591
  expect
1592
1592
  } = Expect$1;
1593
1593
 
1594
- const show$4 = async () => {
1594
+ const show$5 = async () => {
1595
1595
  return invoke$1('About.showAbout');
1596
1596
  };
1597
1597
  const handleClickOk = async () => {
@@ -1617,7 +1617,7 @@ const About = {
1617
1617
  handleClickClose,
1618
1618
  handleClickCopy,
1619
1619
  handleClickOk,
1620
- show: show$4
1620
+ show: show$5
1621
1621
  };
1622
1622
 
1623
1623
  const focus$2 = async () => {
@@ -2160,7 +2160,7 @@ const EditorCompletion = {
2160
2160
  selectIndex: selectIndex$6
2161
2161
  };
2162
2162
 
2163
- const show$3 = async () => {
2163
+ const show$4 = async () => {
2164
2164
  await invoke$1('Editor.showHover2');
2165
2165
  };
2166
2166
  const close$1 = async () => {
@@ -2171,7 +2171,7 @@ const close$1 = async () => {
2171
2171
  const EditorHover = {
2172
2172
  __proto__: null,
2173
2173
  close: close$1,
2174
- show: show$3
2174
+ show: show$4
2175
2175
  };
2176
2176
 
2177
2177
  const handleInput$4 = async value => {
@@ -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 = {
@@ -2975,7 +2981,7 @@ const Main = {
2975
2981
  splitRight
2976
2982
  };
2977
2983
 
2978
- const show$2 = async () => {
2984
+ const show$3 = async () => {
2979
2985
  // @ts-ignore
2980
2986
  await invoke$1('Panel.selectIndex', 1);
2981
2987
  };
@@ -2997,7 +3003,7 @@ const Output = {
2997
3003
  clear: clear$2,
2998
3004
  handleFilterInput: handleFilterInput$1,
2999
3005
  selectChannel,
3000
- show: show$2
3006
+ show: show$3
3001
3007
  };
3002
3008
 
3003
3009
  const open$3 = async id => {
@@ -3046,7 +3052,7 @@ const Platform = {
3046
3052
  isFirefox
3047
3053
  };
3048
3054
 
3049
- const show$1 = async () => {
3055
+ const show$2 = async () => {
3050
3056
  // @ts-ignore
3051
3057
  await invoke$1('Panel.selectIndex', 0);
3052
3058
  };
@@ -3096,7 +3102,7 @@ const Problems = {
3096
3102
  handleClickAt: handleClickAt$1,
3097
3103
  handleFilterInput,
3098
3104
  handleIconThemeChange,
3099
- show: show$1,
3105
+ show: show$2,
3100
3106
  viewAsList,
3101
3107
  viewAsTable
3102
3108
  };
@@ -3397,7 +3403,7 @@ const Settings = {
3397
3403
  update: update$1
3398
3404
  };
3399
3405
 
3400
- const show = async () => {
3406
+ const show$1 = async () => {
3401
3407
  return invoke$1('Main.openUri', 'settings://');
3402
3408
  };
3403
3409
  const handleInput$1 = async searchValue => {
@@ -3443,7 +3449,7 @@ const SettingsView = {
3443
3449
  selectTab,
3444
3450
  selectTextEditor,
3445
3451
  selectWorkspace,
3446
- show,
3452
+ show: show$1,
3447
3453
  useNextSearchValue,
3448
3454
  usePreviousSearchValue
3449
3455
  };
@@ -3474,13 +3480,18 @@ const handleInput = async text => {
3474
3480
  const handleClickSourceControlButtons = async (index, name) => {
3475
3481
  await invoke$1('Source Control.handleClickSourceControlButtons', index, name);
3476
3482
  };
3483
+ const show = async () => {
3484
+ // @ts-ignore
3485
+ await invoke$1('SideBar.open', 'Source Control');
3486
+ };
3477
3487
 
3478
3488
  const SourceControl = {
3479
3489
  __proto__: null,
3480
3490
  acceptInput,
3481
3491
  handleClickSourceControlButtons,
3482
3492
  handleInput,
3483
- selectIndex
3493
+ selectIndex,
3494
+ show
3484
3495
  };
3485
3496
 
3486
3497
  const update = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "7.5.0",
3
+ "version": "7.7.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",