@lvce-editor/file-system-worker 5.18.1 → 5.19.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.
@@ -2046,6 +2046,12 @@ const readJson = async uri => {
2046
2046
  const getRealPath = async path => {
2047
2047
  return getRealPath$2(path);
2048
2048
  };
2049
+ const getFileSize = async uri => {
2050
+ if (isHttp(uri) || isMemory(uri)) {
2051
+ throw new Error(`File size is not supported for ${uri}`);
2052
+ }
2053
+ return invoke$1('FileSystem.getFileSize', uri);
2054
+ };
2049
2055
  const readFileAsBlob = async uri => {
2050
2056
  if (isHttp(uri)) {
2051
2057
  return readFileAsBlob$2(uri);
@@ -2133,6 +2139,7 @@ const FileSystemDisk = {
2133
2139
  exists,
2134
2140
  getFileHash,
2135
2141
  getFileHashes,
2142
+ getFileSize,
2136
2143
  getFolderSize,
2137
2144
  getRealPath,
2138
2145
  isReadonly,
@@ -2590,6 +2597,7 @@ const commandMap = {
2590
2597
  'FileSystem.exists': exists,
2591
2598
  'FileSystem.getFileHash': getFileHash,
2592
2599
  'FileSystem.getFileHashes': getFileHashes,
2600
+ 'FileSystem.getFileSize': getFileSize,
2593
2601
  'FileSystem.getFolderSize': getFolderSize,
2594
2602
  'FileSystem.getRealPath': getRealPath,
2595
2603
  'FileSystem.glob': glob,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-system-worker",
3
- "version": "5.18.1",
3
+ "version": "5.19.0",
4
4
  "description": "File System Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"