@lvce-editor/extension-host-worker 5.40.0 → 6.1.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.
|
@@ -2188,6 +2188,14 @@ const readFile$2 = async (protocol, path) => {
|
|
|
2188
2188
|
throw new VError(error, 'Failed to execute file system provider');
|
|
2189
2189
|
}
|
|
2190
2190
|
};
|
|
2191
|
+
const mkdir$2 = async (protocol, path) => {
|
|
2192
|
+
try {
|
|
2193
|
+
const provider = get$9(protocol);
|
|
2194
|
+
return await provider.mkdir(path);
|
|
2195
|
+
} catch (error) {
|
|
2196
|
+
throw new VError(error, 'Failed to execute file system provider');
|
|
2197
|
+
}
|
|
2198
|
+
};
|
|
2191
2199
|
const readFileExternal = async path => {
|
|
2192
2200
|
// TODO when file is local,
|
|
2193
2201
|
// don't ask renderer worker
|
|
@@ -2198,6 +2206,10 @@ const readFileExternal = async path => {
|
|
|
2198
2206
|
const content = await invoke$1('FileSystem.readFile', path);
|
|
2199
2207
|
return content;
|
|
2200
2208
|
};
|
|
2209
|
+
const removeExternal = async path => {
|
|
2210
|
+
const content = await invoke$1('FileSystem.remove', path);
|
|
2211
|
+
return content;
|
|
2212
|
+
};
|
|
2201
2213
|
const existsExternal = async uri => {
|
|
2202
2214
|
return await invoke$1('FileSystem.exists', uri);
|
|
2203
2215
|
};
|
|
@@ -3187,6 +3199,16 @@ const getIconDefinitions = async providerId => {
|
|
|
3187
3199
|
// TODO return warning that no icons were found?
|
|
3188
3200
|
return [];
|
|
3189
3201
|
};
|
|
3202
|
+
const getFileDecorations = async (providerId, uris) => {
|
|
3203
|
+
const provider = state$8.providers[providerId];
|
|
3204
|
+
// @ts-ignore
|
|
3205
|
+
if (!provider || !provider.getFileDecorations) {
|
|
3206
|
+
return [];
|
|
3207
|
+
}
|
|
3208
|
+
// @ts-ignore
|
|
3209
|
+
const decorations = await provider.getFileDecorations(uris);
|
|
3210
|
+
return decorations;
|
|
3211
|
+
};
|
|
3190
3212
|
|
|
3191
3213
|
const {
|
|
3192
3214
|
registerTabCompletionProvider,
|
|
@@ -3398,6 +3420,7 @@ const api = {
|
|
|
3398
3420
|
readDirWithFileTypes: readDirWithFileTypesExternal,
|
|
3399
3421
|
exists: existsExternal,
|
|
3400
3422
|
mkdir: mkdirExternal,
|
|
3423
|
+
remove: removeExternal,
|
|
3401
3424
|
writeFile: writeFileExternal,
|
|
3402
3425
|
stat: statExternal,
|
|
3403
3426
|
// Formatting
|
|
@@ -4928,6 +4951,7 @@ const FileSystemReadFile = 'ExtensionHostFileSystem.readFile';
|
|
|
4928
4951
|
const FileSystemRename = 'ExtensionHostFileSystem.rename';
|
|
4929
4952
|
const FileSystemWriteFile = 'ExtensionHostFileSystem.writeFile';
|
|
4930
4953
|
const FileSystemRemove = 'ExtensionHostFileSystem.remove';
|
|
4954
|
+
const FileSystemMkdir = 'ExtensionHostFileSystem.mkdir';
|
|
4931
4955
|
const FormattingExecuteFormmattingProvider = 'ExtensionHostFormatting.executeFormattingProvider';
|
|
4932
4956
|
const HoverExecute = 'ExtensionHostHover.execute';
|
|
4933
4957
|
const ImplementationExecuteImplementationProvider = 'ExtensionHostImplementation.executeImplementationProvider';
|
|
@@ -4945,6 +4969,7 @@ const SourceControlGetChangedFiles = 'ExtensionHost.sourceControlGetChangedFiles
|
|
|
4945
4969
|
const SourceControlGetEnabledProviderIds = 'ExtensionHostSourceControl.getEnabledProviderIds';
|
|
4946
4970
|
const SourceControlGetFileBefore = 'ExtensionHostSourceControl.GetFileBefore';
|
|
4947
4971
|
const SourceControlGetGroups = 'ExtensionHostSourceControl.getGroups';
|
|
4972
|
+
const SourceControlGetFileDecorations = 'ExtensionHostSourceControl.getFileDecorations';
|
|
4948
4973
|
const StatusBarGetStatusBarItems = 'ExtensionHost.getStatusBarItems';
|
|
4949
4974
|
const StatusBarRegisterChangeListener = 'ExtensionHostStatusBar.registerChangeListener';
|
|
4950
4975
|
const TabCompletionExecuteTabCompletionProvider = 'ExtensionHost.executeTabCompletionProvider';
|
|
@@ -6255,6 +6280,7 @@ const commandMap = {
|
|
|
6255
6280
|
[FileSystemRename]: rename$1,
|
|
6256
6281
|
[FileSystemWriteFile]: writeFile$3,
|
|
6257
6282
|
[FileSystemRemove]: remove$3,
|
|
6283
|
+
[FileSystemMkdir]: mkdir$2,
|
|
6258
6284
|
[FormattingExecuteFormmattingProvider]: executeFormattingProvider,
|
|
6259
6285
|
[HoverExecute]: executeHoverProvider,
|
|
6260
6286
|
[ImplementationExecuteImplementationProvider]: executeImplementationProvider,
|
|
@@ -6272,6 +6298,7 @@ const commandMap = {
|
|
|
6272
6298
|
[SourceControlGetEnabledProviderIds]: getEnabledProviderIds,
|
|
6273
6299
|
[SourceControlGetFileBefore]: getFileBefore,
|
|
6274
6300
|
[SourceControlGetGroups]: getGroups,
|
|
6301
|
+
[SourceControlGetFileDecorations]: getFileDecorations,
|
|
6275
6302
|
[StatusBarGetStatusBarItems]: getStatusBarItems,
|
|
6276
6303
|
[StatusBarRegisterChangeListener]: registerChangeListener,
|
|
6277
6304
|
[TabCompletionExecuteTabCompletionProvider]: executeTabCompletionProvider,
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/extension-host-worker",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Webworker for the extension host functionality in Lvce Editor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-worker"
|
|
7
7
|
],
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/lvce-editor/extension-host-worker.git"
|
|
11
|
+
},
|
|
8
12
|
"license": "MIT",
|
|
9
13
|
"author": "Lvce Editor",
|
|
10
14
|
"type": "module",
|