@lvce-editor/file-system-worker 5.11.0 → 5.11.1
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.
- package/README.md +0 -4
- package/dist/fileSystemWorkerMain.js +8 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1764,6 +1764,7 @@ const Memory = 'memfs:';
|
|
|
1764
1764
|
const Https = 'https:';
|
|
1765
1765
|
const File$2 = 'file:';
|
|
1766
1766
|
const Fetch$1 = 'fetch:';
|
|
1767
|
+
const Html = 'html:';
|
|
1767
1768
|
|
|
1768
1769
|
const watchCallbacks = Object.create(null);
|
|
1769
1770
|
const registerWatchCallback = (id, rpcId, commandId, uri) => {
|
|
@@ -1951,6 +1952,10 @@ const isFetch = uri => {
|
|
|
1951
1952
|
return uri.startsWith(Fetch$1);
|
|
1952
1953
|
};
|
|
1953
1954
|
|
|
1955
|
+
const isHtml = uri => {
|
|
1956
|
+
return uri.startsWith(Html);
|
|
1957
|
+
};
|
|
1958
|
+
|
|
1954
1959
|
const isHttp = uri => {
|
|
1955
1960
|
return uri.startsWith(Http) || uri.startsWith(Https);
|
|
1956
1961
|
};
|
|
@@ -1966,7 +1971,7 @@ const remove = async dirent => {
|
|
|
1966
1971
|
return remove$2(dirent);
|
|
1967
1972
|
};
|
|
1968
1973
|
const readFile = async uri => {
|
|
1969
|
-
if (isFetch(uri)) {
|
|
1974
|
+
if (isFetch(uri) || isHtml(uri)) {
|
|
1970
1975
|
return invoke$2('FileSystem.readFile', uri);
|
|
1971
1976
|
}
|
|
1972
1977
|
if (isHttp(uri)) {
|
|
@@ -1984,7 +1989,7 @@ const appendFile = async (uri, text) => {
|
|
|
1984
1989
|
return appendFile$1(uri, text);
|
|
1985
1990
|
};
|
|
1986
1991
|
const readDirWithFileTypes = async uri => {
|
|
1987
|
-
if (isFetch(uri)) {
|
|
1992
|
+
if (isFetch(uri) || isHtml(uri)) {
|
|
1988
1993
|
return invoke$2('FileSystem.readDirWithFileTypes', uri);
|
|
1989
1994
|
}
|
|
1990
1995
|
if (isMemory(uri)) {
|
|
@@ -2033,7 +2038,7 @@ const stat = async dirent => {
|
|
|
2033
2038
|
return stat$2(dirent);
|
|
2034
2039
|
};
|
|
2035
2040
|
const exists = async uri => {
|
|
2036
|
-
if (isFetch(uri)) {
|
|
2041
|
+
if (isFetch(uri) || isHtml(uri)) {
|
|
2037
2042
|
return invoke$2('FileSystem.exists', uri);
|
|
2038
2043
|
}
|
|
2039
2044
|
if (isHttp(uri)) {
|