@lvce-editor/file-system-worker 5.18.0 → 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.
@@ -1538,10 +1538,6 @@ const appendFile$2 = async (uri, text) => {
1538
1538
  const readDirWithFileTypes$4 = async uri => {
1539
1539
  return invoke$3('FileSystem.readDirWithFileTypes', uri);
1540
1540
  };
1541
- const getPathSeparator$4 = async root => {
1542
- // @ts-ignore
1543
- return invoke$3('FileSystem.getPathSeparator', root);
1544
- };
1545
1541
  const readJson$4 = async root => {
1546
1542
  // @ts-ignore
1547
1543
  return invoke$3('FileSystem.readJson', root);
@@ -1585,7 +1581,6 @@ const FileSystemProcess = {
1585
1581
  copy: copy$4,
1586
1582
  exists: exists$4,
1587
1583
  getFolderSize: getFolderSize$4,
1588
- getPathSeparator: getPathSeparator$4,
1589
1584
  getRealPath: getRealPath$4,
1590
1585
  invoke: invoke$3,
1591
1586
  mkdir: mkdir$4,
@@ -1720,9 +1715,6 @@ const exists$3 = async uri => {
1720
1715
  const readDirWithFileTypes$3 = async uri => {
1721
1716
  throw new Error('not implemented');
1722
1717
  };
1723
- const getPathSeparator$3 = async root => {
1724
- return '/';
1725
- };
1726
1718
  const readJson$3 = async uri => {
1727
1719
  const response = await fetch(uri);
1728
1720
  if (!response.ok) {
@@ -1762,7 +1754,6 @@ const FileSystemFetch = {
1762
1754
  createFile: createFile$2,
1763
1755
  exists: exists$3,
1764
1756
  getFolderSize: getFolderSize$3,
1765
- getPathSeparator: getPathSeparator$3,
1766
1757
  getRealPath: getRealPath$3,
1767
1758
  mkdir: mkdir$3,
1768
1759
  readDirWithFileTypes: readDirWithFileTypes$3,
@@ -1794,7 +1785,6 @@ const {
1794
1785
  copy: copy$2,
1795
1786
  exists: exists$2,
1796
1787
  getFolderSize: getFolderSize$2,
1797
- getPathSeparator: getPathSeparator$2,
1798
1788
  getRealPath: getRealPath$2,
1799
1789
  invoke: invoke$1,
1800
1790
  mkdir: mkdir$2,
@@ -1936,9 +1926,6 @@ const exists$1 = async uri => {
1936
1926
  const readDirWithFileTypes$1 = async uri => {
1937
1927
  throw new Error('not implemented');
1938
1928
  };
1939
- const getPathSeparator$1 = async root => {
1940
- return '/';
1941
- };
1942
1929
  const readJson$1 = async uri => {
1943
1930
  throw new Error('not implemented');
1944
1931
  };
@@ -1980,7 +1967,6 @@ const FileSystemMemory = {
1980
1967
  createFile: createFile$1,
1981
1968
  exists: exists$1,
1982
1969
  getFolderSize: getFolderSize$1,
1983
- getPathSeparator: getPathSeparator$1,
1984
1970
  getRealPath: getRealPath$1,
1985
1971
  mkdir: mkdir$1,
1986
1972
  readDirWithFileTypes: readDirWithFileTypes$1,
@@ -2045,9 +2031,6 @@ const readDirWithFileTypes = async uri => {
2045
2031
  }
2046
2032
  return readDirWithFileTypes$2(uri);
2047
2033
  };
2048
- const getPathSeparator = async root => {
2049
- return getPathSeparator$2(root);
2050
- };
2051
2034
  const isReadonly = async uri => {
2052
2035
  return invoke$1('FileSystem.isReadonly', uri);
2053
2036
  };
@@ -2063,6 +2046,12 @@ const readJson = async uri => {
2063
2046
  const getRealPath = async path => {
2064
2047
  return getRealPath$2(path);
2065
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
+ };
2066
2055
  const readFileAsBlob = async uri => {
2067
2056
  if (isHttp(uri)) {
2068
2057
  return readFileAsBlob$2(uri);
@@ -2150,8 +2139,8 @@ const FileSystemDisk = {
2150
2139
  exists,
2151
2140
  getFileHash,
2152
2141
  getFileHashes,
2142
+ getFileSize,
2153
2143
  getFolderSize,
2154
- getPathSeparator,
2155
2144
  getRealPath,
2156
2145
  isReadonly,
2157
2146
  mkdir,
@@ -2608,8 +2597,8 @@ const commandMap = {
2608
2597
  'FileSystem.exists': exists,
2609
2598
  'FileSystem.getFileHash': getFileHash,
2610
2599
  'FileSystem.getFileHashes': getFileHashes,
2600
+ 'FileSystem.getFileSize': getFileSize,
2611
2601
  'FileSystem.getFolderSize': getFolderSize,
2612
- 'FileSystem.getPathSeparator': getPathSeparator,
2613
2602
  'FileSystem.getRealPath': getRealPath,
2614
2603
  'FileSystem.glob': glob,
2615
2604
  'FileSystem.handleMessagePort': handleMessagePort,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-system-worker",
3
- "version": "5.18.0",
3
+ "version": "5.19.0",
4
4
  "description": "File System Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"