@lvce-editor/extension-host-worker 5.11.0 → 5.12.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.
@@ -754,7 +754,7 @@ const setConfigurations = preferences => {
754
754
  };
755
755
 
756
756
  const rpcs$2 = Object.create(null);
757
- const set$d = (id, rpc) => {
757
+ const set$g = (id, rpc) => {
758
758
  rpcs$2[id] = rpc;
759
759
  };
760
760
  const get$a = id => {
@@ -778,7 +778,7 @@ const create$c = rpcId => {
778
778
  return rpc.invokeAndTransfer(method, ...params);
779
779
  },
780
780
  set(rpc) {
781
- set$d(rpcId, rpc);
781
+ set$g(rpcId, rpc);
782
782
  },
783
783
  async dispose() {
784
784
  const rpc = get$a(rpcId);
@@ -788,10 +788,10 @@ const create$c = rpcId => {
788
788
  };
789
789
  const DebugWorker$1 = 55;
790
790
  const {
791
- invoke: invoke$c} = create$c(DebugWorker$1);
791
+ invoke: invoke$d} = create$c(DebugWorker$1);
792
792
  const DebugWorker = {
793
793
  __proto__: null,
794
- invoke: invoke$c};
794
+ invoke: invoke$d};
795
795
 
796
796
  const {
797
797
  invoke: invoke$3
@@ -4892,6 +4892,10 @@ const renameFile = (oldUri, newUri) => {
4892
4892
  writeFile(newUri, content);
4893
4893
  remove(oldUri);
4894
4894
  };
4895
+ const copy = (oldUri, newUri) => {
4896
+ const content = readFile(oldUri);
4897
+ writeFile(newUri, content);
4898
+ };
4895
4899
  const renameDirectory = (oldUri, newUri) => {
4896
4900
  if (!oldUri.endsWith(Slash)) {
4897
4901
  oldUri += Slash;
@@ -5124,7 +5128,7 @@ const handleMessagePort2 = async (port, rpcId) => {
5124
5128
  commandMap: {}
5125
5129
  });
5126
5130
  if (rpcId) {
5127
- set$d(rpcId, rpc);
5131
+ set$g(rpcId, rpc);
5128
5132
  }
5129
5133
  };
5130
5134
 
@@ -5134,7 +5138,7 @@ const handleMessagePort = async (port, rpcId) => {
5134
5138
  commandMap: {}
5135
5139
  });
5136
5140
  if (rpcId) {
5137
- set$d(rpcId, rpc);
5141
+ set$g(rpcId, rpc);
5138
5142
  }
5139
5143
  };
5140
5144
 
@@ -5740,6 +5744,7 @@ const commandMap = {
5740
5744
  'FileSystemMemory.readDirWithFileTypes': readDirWithFileTypes,
5741
5745
  'FileSystemMemory.readFile': readFile,
5742
5746
  'FileSystemMemory.rename': rename,
5747
+ 'FileSystemMemory.copy': copy,
5743
5748
  'FileSystemMemory.remove': remove,
5744
5749
  'FileSystemMemory.writeFile': writeFile,
5745
5750
  'HandleBeforeUnload.handleBeforeUnload': handleBeforeUnload,
@@ -5816,7 +5821,7 @@ const listen = async () => {
5816
5821
  const rpc = await WebWorkerRpcClient.create({
5817
5822
  commandMap: commandMap
5818
5823
  });
5819
- set$d(RendererWorker, rpc);
5824
+ set$g(RendererWorker, rpc);
5820
5825
  };
5821
5826
 
5822
5827
  const main = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-host-worker",
3
- "version": "5.11.0",
3
+ "version": "5.12.0",
4
4
  "description": "Webworker for the extension host functionality in Lvce Editor.",
5
5
  "keywords": [
6
6
  "web-worker"