@lvce-editor/file-system-worker 1.5.0 → 1.6.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.
@@ -541,7 +541,7 @@ const set$2 = (id, fn) => {
541
541
  const get$1 = id => {
542
542
  return callbacks[id];
543
543
  };
544
- const remove$1 = id => {
544
+ const remove$2 = id => {
545
545
  delete callbacks[id];
546
546
  };
547
547
  let id = 0;
@@ -725,7 +725,7 @@ const resolve = (id, response) => {
725
725
  return;
726
726
  }
727
727
  fn(response);
728
- remove$1(id);
728
+ remove$2(id);
729
729
  };
730
730
  const E_COMMAND_NOT_FOUND = 'E_COMMAND_NOT_FOUND';
731
731
  const getErrorType = prettyError => {
@@ -898,7 +898,7 @@ const send = (transport, method, ...params) => {
898
898
  const message = create$4$1(method, params);
899
899
  transport.send(message);
900
900
  };
901
- const invoke$1 = (ipc, method, ...params) => {
901
+ const invoke = (ipc, method, ...params) => {
902
902
  return invokeHelper(ipc, method, params, false);
903
903
  };
904
904
  const invokeAndTransfer$1 = (ipc, method, ...params) => {
@@ -931,7 +931,7 @@ const createRpc = ipc => {
931
931
  send(ipc, method, ...params);
932
932
  },
933
933
  invoke(method, ...params) {
934
- return invoke$1(ipc, method, ...params);
934
+ return invoke(ipc, method, ...params);
935
935
  },
936
936
  invokeAndTransfer(method, ...params) {
937
937
  return invokeAndTransfer$1(ipc, method, ...params);
@@ -1076,10 +1076,61 @@ const RpcId = {
1076
1076
  const {
1077
1077
  invoke: invoke$8,
1078
1078
  set: set$8} = create(FileSystemProcess$1);
1079
+ const remove$1$1 = async uri => {
1080
+ return invoke$8('FileSystem.remove', uri);
1081
+ };
1082
+ const readFile$1$1 = async uri => {
1083
+ return invoke$8('FileSystem.readFile', uri);
1084
+ };
1085
+ const readDirWithFileTypes$1$1 = async uri => {
1086
+ return invoke$8('FileSystem.readDirWithFileTypes', uri);
1087
+ };
1088
+ const getPathSeparator$1$1 = async root => {
1089
+ // @ts-ignore
1090
+ return invoke$8('FileSystem.getPathSeparator', root);
1091
+ };
1092
+ const readJson$2 = async root => {
1093
+ // @ts-ignore
1094
+ return invoke$8('FileSystem.readJson', root);
1095
+ };
1096
+ const getRealPath$1$1 = async path => {
1097
+ // @ts-ignore
1098
+ return invoke$8('FileSystem.getRealPath', path);
1099
+ };
1100
+ const stat$1$1 = async path => {
1101
+ // @ts-ignore
1102
+ return invoke$8('FileSystem.stat', path);
1103
+ };
1104
+ const writeFile$1$1 = async (path, content) => {
1105
+ // @ts-ignore
1106
+ return invoke$8('FileSystem.writeFile', path, content);
1107
+ };
1108
+ const mkdir$1$1 = async path => {
1109
+ // @ts-ignore
1110
+ return invoke$8('FileSystem.mkdir', path);
1111
+ };
1112
+ const rename$1$1 = async (oldUri, newUri) => {
1113
+ // @ts-ignore
1114
+ return invoke$8('FileSystem.rename', oldUri, newUri);
1115
+ };
1116
+ const copy$1$1 = async (oldUri, newUri) => {
1117
+ // @ts-ignore
1118
+ return invoke$8('FileSystem.copy', oldUri, newUri);
1119
+ };
1079
1120
  const FileSystemProcess = {
1080
1121
  __proto__: null,
1081
- invoke: invoke$8,
1082
- set: set$8
1122
+ copy: copy$1$1,
1123
+ getPathSeparator: getPathSeparator$1$1,
1124
+ getRealPath: getRealPath$1$1,
1125
+ mkdir: mkdir$1$1,
1126
+ readDirWithFileTypes: readDirWithFileTypes$1$1,
1127
+ readFile: readFile$1$1,
1128
+ readJson: readJson$2,
1129
+ remove: remove$1$1,
1130
+ rename: rename$1$1,
1131
+ set: set$8,
1132
+ stat: stat$1$1,
1133
+ writeFile: writeFile$1$1
1083
1134
  };
1084
1135
  const {
1085
1136
  invokeAndTransfer: invokeAndTransfer$3,
@@ -1090,47 +1141,55 @@ const RendererWorker = {
1090
1141
  set: set$3};
1091
1142
 
1092
1143
  const {
1093
- invoke,
1094
- set: set$1
1144
+ set: set$1,
1145
+ rename: rename$1,
1146
+ copy: copy$1,
1147
+ mkdir: mkdir$1,
1148
+ writeFile: writeFile$1,
1149
+ stat: stat$1,
1150
+ readJson: readJson$1,
1151
+ getPathSeparator: getPathSeparator$1,
1152
+ getRealPath: getRealPath$1,
1153
+ readDirWithFileTypes: readDirWithFileTypes$1,
1154
+ readFile: readFile$1,
1155
+ remove: remove$1
1095
1156
  } = FileSystemProcess;
1096
1157
 
1097
1158
  const remove = async dirent => {
1098
- return invoke('FileSystem.remove', dirent);
1159
+ return remove$1(dirent);
1099
1160
  };
1100
1161
  const readFile = async uri => {
1101
- return invoke('FileSystem.readFile', uri);
1162
+ return readFile$1(uri);
1102
1163
  };
1103
1164
  const readDirWithFileTypes = async uri => {
1104
- return invoke('FileSystem.readDirWithFileTypes', uri);
1165
+ return readDirWithFileTypes$1(uri);
1105
1166
  };
1106
1167
  const getPathSeparator = async root => {
1107
- // @ts-ignore
1108
- return invoke('FileSystem.getPathSeparator', root);
1168
+ return getPathSeparator$1(root);
1109
1169
  };
1110
1170
  const readJson = async uri => {
1111
- // @ts-ignore
1112
- return invoke('FileSystem.readJson', uri);
1171
+ return readJson$1(uri);
1113
1172
  };
1114
1173
  const getRealPath = async path => {
1115
- return invoke('FileSystem.getRealPath', path);
1174
+ return getRealPath$1(path);
1116
1175
  };
1117
1176
  const stat = async dirent => {
1118
- return invoke('FileSystem.stat', dirent);
1177
+ return stat$1(dirent);
1119
1178
  };
1120
1179
  const createFile = async uri => {
1121
- return invoke('FileSystem.writeFile', uri, '');
1180
+ return writeFile$1(uri, '');
1122
1181
  };
1123
1182
  const writeFile = async (uri, content) => {
1124
- return invoke('FileSystem.writeFile', uri, content);
1183
+ return writeFile$1(uri, content);
1125
1184
  };
1126
1185
  const mkdir = async uri => {
1127
- return invoke('FileSystem.mkdir', uri);
1186
+ return mkdir$1(uri);
1128
1187
  };
1129
1188
  const rename = async (oldUri, newUri) => {
1130
- return invoke('FileSystem.rename', oldUri, newUri);
1189
+ return rename$1(oldUri, newUri);
1131
1190
  };
1132
1191
  const copy = async (oldUri, newUri) => {
1133
- return invoke('FileSystem.copy', oldUri, newUri);
1192
+ return copy$1(oldUri, newUri);
1134
1193
  };
1135
1194
 
1136
1195
  const getPortTuple = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-system-worker",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "File System Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"