@lvce-editor/extension-host-worker 4.15.0 → 4.17.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.
@@ -3118,7 +3118,8 @@ const getWebExtensionManifest = async (path, manifestPath) => {
3118
3118
  const manifest = await getJson(manifestPath);
3119
3119
  return {
3120
3120
  ...manifest,
3121
- path
3121
+ path,
3122
+ uri: path
3122
3123
  };
3123
3124
  } catch (error) {
3124
3125
  const id = interExtensionId(path);
@@ -4727,6 +4728,11 @@ const remove = uri => {
4727
4728
  remove$1(key);
4728
4729
  }
4729
4730
  };
4731
+ const rename = (oldUri, newUri) => {
4732
+ const content = readFile(oldUri);
4733
+ writeFile(newUri, content);
4734
+ remove(oldUri);
4735
+ };
4730
4736
  const readDirWithFileTypes = uri => {
4731
4737
  if (!uri.endsWith(Slash)) {
4732
4738
  uri += Slash;
@@ -5525,6 +5531,7 @@ const commandMap = {
5525
5531
  'FileSystemMemory.mkdir': mkdir,
5526
5532
  'FileSystemMemory.readDirWithFileTypes': readDirWithFileTypes,
5527
5533
  'FileSystemMemory.readFile': readFile,
5534
+ 'FileSystemMemory.rename': rename,
5528
5535
  'FileSystemMemory.remove': remove,
5529
5536
  'FileSystemMemory.writeFile': writeFile,
5530
5537
  'HandleBeforeUnload.handleBeforeUnload': handleBeforeUnload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-host-worker",
3
- "version": "4.15.0",
3
+ "version": "4.17.0",
4
4
  "description": "Webworker for the extension host functionality in Lvce Editor.",
5
5
  "keywords": [
6
6
  "web-worker"