@lvce-editor/extension-management-worker 4.38.1 → 4.39.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.
|
@@ -2855,7 +2855,7 @@ const getProviderIds$1 = extension => {
|
|
|
2855
2855
|
const findExtension$1 = (extensions, providerId) => {
|
|
2856
2856
|
return extensions.find(extension => getProviderIds$1(extension).includes(providerId));
|
|
2857
2857
|
};
|
|
2858
|
-
const
|
|
2858
|
+
const executeFileSystemProviderMethod = async (extensionsState, method, providerId, ...args) => {
|
|
2859
2859
|
const {
|
|
2860
2860
|
assetDir,
|
|
2861
2861
|
platform
|
|
@@ -2868,12 +2868,24 @@ const executeFileSystemProviderReadFile = async (extensionsState, providerId, ur
|
|
|
2868
2868
|
};
|
|
2869
2869
|
}
|
|
2870
2870
|
const rpc = await getRpc$1(extension, assetDir, platform);
|
|
2871
|
-
const result = await rpc.invoke(
|
|
2871
|
+
const result = await rpc.invoke(method, providerId, ...args);
|
|
2872
2872
|
return {
|
|
2873
2873
|
found: true,
|
|
2874
2874
|
result
|
|
2875
2875
|
};
|
|
2876
2876
|
};
|
|
2877
|
+
const executeFileSystemProviderGetPathSeparator = (extensionsState, providerId) => {
|
|
2878
|
+
return executeFileSystemProviderMethod(extensionsState, 'ExtensionApi.executeFileSystemProviderGetPathSeparator', providerId);
|
|
2879
|
+
};
|
|
2880
|
+
const executeFileSystemProviderIsReadonly = (extensionsState, providerId) => {
|
|
2881
|
+
return executeFileSystemProviderMethod(extensionsState, 'ExtensionApi.executeFileSystemProviderIsReadonly', providerId);
|
|
2882
|
+
};
|
|
2883
|
+
const executeFileSystemProviderReadDirWithFileTypes = (extensionsState, providerId, uri) => {
|
|
2884
|
+
return executeFileSystemProviderMethod(extensionsState, 'ExtensionApi.executeFileSystemProviderReadDirWithFileTypes', providerId, uri);
|
|
2885
|
+
};
|
|
2886
|
+
const executeFileSystemProviderReadFile = (extensionsState, providerId, uri) => {
|
|
2887
|
+
return executeFileSystemProviderMethod(extensionsState, 'ExtensionApi.executeFileSystemProviderReadFile', providerId, uri);
|
|
2888
|
+
};
|
|
2877
2889
|
|
|
2878
2890
|
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
2879
2891
|
|
|
@@ -3895,6 +3907,9 @@ const commandMap = {
|
|
|
3895
3907
|
'Extensions.executeCompletionProvider': wrapCommand(executeCompletionProvider),
|
|
3896
3908
|
'Extensions.executeDiagnosticProvider': wrapCommand(executeDiagnosticProvider),
|
|
3897
3909
|
'Extensions.executeExtensionCommand': wrapCommand(executeExtensionCommand),
|
|
3910
|
+
'Extensions.executeFileSystemProviderGetPathSeparator': wrapCommand(executeFileSystemProviderGetPathSeparator),
|
|
3911
|
+
'Extensions.executeFileSystemProviderIsReadonly': wrapCommand(executeFileSystemProviderIsReadonly),
|
|
3912
|
+
'Extensions.executeFileSystemProviderReadDirWithFileTypes': wrapCommand(executeFileSystemProviderReadDirWithFileTypes),
|
|
3898
3913
|
'Extensions.executeFileSystemProviderReadFile': wrapCommand(executeFileSystemProviderReadFile),
|
|
3899
3914
|
'Extensions.executeFormattingProvider': wrapCommand(executeFormattingProvider),
|
|
3900
3915
|
'Extensions.executeHoverProvider': wrapCommand(executeHoverProvider),
|