@lvce-editor/file-system-worker 1.8.0 → 1.9.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.
@@ -988,6 +988,10 @@ const create$5 = async ({
988
988
  messagePort.start();
989
989
  return rpc;
990
990
  };
991
+ const PlainMessagePortRpc = {
992
+ __proto__: null,
993
+ create: create$5
994
+ };
991
995
  const create$4 = async ({
992
996
  commandMap,
993
997
  messagePort
@@ -1246,6 +1250,13 @@ const getFolderSize = async uri => {
1246
1250
  return getFolderSize$1(uri);
1247
1251
  };
1248
1252
 
1253
+ const handleMessagePort = async (port, rpcId) => {
1254
+ await PlainMessagePortRpc.create({
1255
+ commandMap: {},
1256
+ messagePort: port
1257
+ });
1258
+ };
1259
+
1249
1260
  const getPortTuple = () => {
1250
1261
  const {
1251
1262
  port1,
@@ -1333,6 +1344,7 @@ const commandMap = {
1333
1344
  'FileSystem.stat': stat,
1334
1345
  'FileSystem.writeFile': writeFile,
1335
1346
  'FileSystem.getFolderSize': getFolderSize,
1347
+ 'FileSystem.handleMessagePort': handleMessagePort,
1336
1348
  'Initialize.initialize': initialize
1337
1349
  };
1338
1350
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-system-worker",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "File System Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"