@lvce-editor/extension-host-worker 5.25.0 → 5.27.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.
|
@@ -1108,6 +1108,14 @@ const readDirWithFileTypesExternal = async path => {
|
|
|
1108
1108
|
const content = await invoke$2('FileSystem.readDirWithFileTypes', path);
|
|
1109
1109
|
return content;
|
|
1110
1110
|
};
|
|
1111
|
+
const remove$4 = async (protocol, path) => {
|
|
1112
|
+
try {
|
|
1113
|
+
const provider = get$a(protocol);
|
|
1114
|
+
return await provider.remove(path);
|
|
1115
|
+
} catch (error) {
|
|
1116
|
+
throw new VError(error, 'Failed to execute file system provider');
|
|
1117
|
+
}
|
|
1118
|
+
};
|
|
1111
1119
|
const rename$1 = async (protocol, oldUri, newUri) => {
|
|
1112
1120
|
try {
|
|
1113
1121
|
const provider = get$a(protocol);
|
|
@@ -4821,6 +4829,7 @@ const FileSystemReadDirWithFileTypes = 'ExtensionHostFileSystem.readDirWithFileT
|
|
|
4821
4829
|
const FileSystemReadFile = 'ExtensionHostFileSystem.readFile';
|
|
4822
4830
|
const FileSystemRename = 'ExtensionHostFileSystem.rename';
|
|
4823
4831
|
const FileSystemWriteFile = 'ExtensionHostFileSystem.writeFile';
|
|
4832
|
+
const FileSystemRemove = 'ExtensionHostFileSystem.remove';
|
|
4824
4833
|
const FormattingExecuteFormmattingProvider = 'ExtensionHostFormatting.executeFormattingProvider';
|
|
4825
4834
|
const HoverExecute = 'ExtensionHostHover.execute';
|
|
4826
4835
|
const ImplementationExecuteImplementationProvider = 'ExtensionHostImplementation.executeImplementationProvider';
|
|
@@ -5167,7 +5176,7 @@ const renameDirectory = (oldUri, newUri) => {
|
|
|
5167
5176
|
remove(oldUri);
|
|
5168
5177
|
};
|
|
5169
5178
|
const rename = (oldUri, newUri) => {
|
|
5170
|
-
const item = getDirent(oldUri);
|
|
5179
|
+
const item = getDirent(oldUri) || getDirent(`${oldUri}/`);
|
|
5171
5180
|
if (!item) {
|
|
5172
5181
|
throw new FileNotFoundError(oldUri);
|
|
5173
5182
|
}
|
|
@@ -5569,6 +5578,10 @@ const getValuesByIndexName = async (storeId, indexName, only) => {
|
|
|
5569
5578
|
return objects;
|
|
5570
5579
|
};
|
|
5571
5580
|
|
|
5581
|
+
const invalidateExtensionsCache = () => {
|
|
5582
|
+
clear();
|
|
5583
|
+
};
|
|
5584
|
+
|
|
5572
5585
|
const getLanguagesFromExtension = extension => {
|
|
5573
5586
|
// TODO what if extension is null? should not crash process, handle error gracefully
|
|
5574
5587
|
// TODO what if extension languages is not of type array?
|
|
@@ -5998,6 +6011,7 @@ const unregisterInterceptor = async id => {
|
|
|
5998
6011
|
};
|
|
5999
6012
|
|
|
6000
6013
|
const commandMap = {
|
|
6014
|
+
'Extensions.invalidateExtensionsCache': invalidateExtensionsCache,
|
|
6001
6015
|
'BulkReplacement.applyBulkReplacement': applyBulkReplacement,
|
|
6002
6016
|
'ColorTheme.getColorThemeCssFromJson': getColorThemeCssFromJson,
|
|
6003
6017
|
'ColorTheme.getColorThemeJson': getColorThemeJson,
|
|
@@ -6098,6 +6112,7 @@ const commandMap = {
|
|
|
6098
6112
|
[FileSystemReadFile]: readFile$2,
|
|
6099
6113
|
[FileSystemRename]: rename$1,
|
|
6100
6114
|
[FileSystemWriteFile]: writeFile$3,
|
|
6115
|
+
[FileSystemRemove]: remove$4,
|
|
6101
6116
|
[FormattingExecuteFormmattingProvider]: executeFormattingProvider,
|
|
6102
6117
|
[HoverExecute]: executeHoverProvider,
|
|
6103
6118
|
[ImplementationExecuteImplementationProvider]: executeImplementationProvider,
|