@lvce-editor/extension-host-worker 6.2.0 → 6.3.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.
@@ -3535,7 +3535,7 @@ const hasRecentErrors = () => {
3535
3535
  return state$5.errors.length > 0;
3536
3536
  };
3537
3537
  const getRecentError = () => {
3538
- state$5.errors.at(-1);
3538
+ return state$5.errors.at(-1);
3539
3539
  };
3540
3540
 
3541
3541
  const handleContentSecurityPolicyViolation = event => {
@@ -5098,6 +5098,13 @@ const readFile$1 = async uri => {
5098
5098
  const text = await getText(fetchUri);
5099
5099
  return text;
5100
5100
  };
5101
+ const exists$1 = async uri => {
5102
+ const response = await fetch(uri);
5103
+ if (!response.ok) {
5104
+ throw new Error(response.statusText);
5105
+ }
5106
+ return response.ok;
5107
+ };
5101
5108
  const writeFile$1 = () => {
5102
5109
  throw new Error('not implemented');
5103
5110
  };
@@ -6228,6 +6235,7 @@ const commandMap = {
6228
6235
  'FileSystemFetch.readDirWithFileTypes': readDirWithFileTypes$1,
6229
6236
  'FileSystemFetch.readFile': readFile$1,
6230
6237
  'FileSystemFetch.remove': remove$2,
6238
+ 'FileSystemFetch.exists': exists$1,
6231
6239
  'FileSystemFetch.writeFile': writeFile$1,
6232
6240
  'FileSystemMemory.chmod': chmod,
6233
6241
  'FileSystemMemory.copy': copy,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-host-worker",
3
- "version": "6.2.0",
3
+ "version": "6.3.0",
4
4
  "description": "Webworker for the extension host functionality in Lvce Editor.",
5
5
  "keywords": [
6
6
  "web-worker"