@lvce-editor/extension-host-worker 5.33.0 → 5.35.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.
|
@@ -733,6 +733,19 @@ const executeCommand = async (id, ...args) => {
|
|
|
733
733
|
}
|
|
734
734
|
};
|
|
735
735
|
|
|
736
|
+
const {
|
|
737
|
+
registerCommentProvider,
|
|
738
|
+
executeCommentProvider
|
|
739
|
+
} = create$b({
|
|
740
|
+
name: 'Comment',
|
|
741
|
+
resultShape: {
|
|
742
|
+
type: Array$1,
|
|
743
|
+
items: {
|
|
744
|
+
type: Object$1
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
|
|
736
749
|
const {
|
|
737
750
|
registerCompletionProvider,
|
|
738
751
|
executeCompletionProvider,
|
|
@@ -2197,6 +2210,9 @@ const mkdirExternal = async uri => {
|
|
|
2197
2210
|
const writeFileExternal = async (uri, content) => {
|
|
2198
2211
|
return await invoke$1('FileSystem.writeFile', uri, content);
|
|
2199
2212
|
};
|
|
2213
|
+
const statExternal = async uri => {
|
|
2214
|
+
return await invoke$1('FileSystem.stat', uri);
|
|
2215
|
+
};
|
|
2200
2216
|
const readDirWithFileTypesExternal = async path => {
|
|
2201
2217
|
// TODO when file is local,
|
|
2202
2218
|
// don't ask renderer worker
|
|
@@ -3348,6 +3364,10 @@ const api = {
|
|
|
3348
3364
|
// Command
|
|
3349
3365
|
registerCommand: registerCommand,
|
|
3350
3366
|
executeCommand: executeCommand,
|
|
3367
|
+
// Comment
|
|
3368
|
+
|
|
3369
|
+
registerCommentProvider: registerCommentProvider,
|
|
3370
|
+
executeCommentProvider: executeCommentProvider,
|
|
3351
3371
|
// Completion
|
|
3352
3372
|
registerCompletionProvider: registerCompletionProvider,
|
|
3353
3373
|
executeCompletionProvider: executeCompletionProvider,
|
|
@@ -3378,6 +3398,7 @@ const api = {
|
|
|
3378
3398
|
exists: existsExternal,
|
|
3379
3399
|
mkdir: mkdirExternal,
|
|
3380
3400
|
writeFile: writeFileExternal,
|
|
3401
|
+
stat: statExternal,
|
|
3381
3402
|
// Formatting
|
|
3382
3403
|
registerFormattingProvider: registerFormattingProvider,
|
|
3383
3404
|
executeFormattingProvider: executeFormattingProvider,
|
|
@@ -4894,6 +4915,7 @@ const BraceCompletionExecuteBraceCompletionProvider = 'ExtensionHostBraceComplet
|
|
|
4894
4915
|
const ClosingTagExecuteClosingTagProvider = 'ExtensionHostClosingTag.executeClosingTagProvider';
|
|
4895
4916
|
const CommandExecute = 'ExtensionHostCommand.executeCommand';
|
|
4896
4917
|
const CompletionExecute = 'ExtensionHostCompletion.execute';
|
|
4918
|
+
const CommentProviderExecute = 'ExtensionHostCommment.execute';
|
|
4897
4919
|
const CompletionResolveExecute = 'ExtensionHostCompletion.executeResolve';
|
|
4898
4920
|
const ConfigurationSetConfiguration = 'ExtensionHostConfiguration.setConfiguration';
|
|
4899
4921
|
const DefinitionExecuteDefinitionProvider = 'ExtensionHostDefinition.executeDefinitionProvider';
|
|
@@ -5173,6 +5195,31 @@ const exists = uri => {
|
|
|
5173
5195
|
}
|
|
5174
5196
|
return true;
|
|
5175
5197
|
};
|
|
5198
|
+
const stat = uri => {
|
|
5199
|
+
const dirent = getDirent(uri);
|
|
5200
|
+
if (!dirent) {
|
|
5201
|
+
return {
|
|
5202
|
+
exists: false,
|
|
5203
|
+
size: 0
|
|
5204
|
+
};
|
|
5205
|
+
}
|
|
5206
|
+
if (dirent.type === File$1) {
|
|
5207
|
+
return {
|
|
5208
|
+
exists: true,
|
|
5209
|
+
type: File$1
|
|
5210
|
+
};
|
|
5211
|
+
}
|
|
5212
|
+
if (dirent.type === Directory$1) {
|
|
5213
|
+
return {
|
|
5214
|
+
exists: true,
|
|
5215
|
+
type: Directory$1
|
|
5216
|
+
};
|
|
5217
|
+
}
|
|
5218
|
+
return {
|
|
5219
|
+
exists: true,
|
|
5220
|
+
type: dirent.type
|
|
5221
|
+
};
|
|
5222
|
+
};
|
|
5176
5223
|
const ensureParentDir = uri => {
|
|
5177
5224
|
const startIndex = 0;
|
|
5178
5225
|
let endIndex = uri.indexOf(Slash);
|
|
@@ -6147,6 +6194,7 @@ const commandMap = {
|
|
|
6147
6194
|
'FileSystemMemory.chmod': chmod,
|
|
6148
6195
|
'FileSystemMemory.copy': copy,
|
|
6149
6196
|
'FileSystemMemory.exists': exists,
|
|
6197
|
+
'FileSystemMemory.stat': stat,
|
|
6150
6198
|
'FileSystemMemory.getBlob': getBlob,
|
|
6151
6199
|
'FileSystemMemory.getBlobUrl': getBlobUrl,
|
|
6152
6200
|
'FileSystemMemory.getFiles': getFiles,
|
|
@@ -6191,6 +6239,7 @@ const commandMap = {
|
|
|
6191
6239
|
[ClosingTagExecuteClosingTagProvider]: executeClosingTagProvider,
|
|
6192
6240
|
[CommandExecute]: executeCommand,
|
|
6193
6241
|
[CompletionExecute]: executeCompletionProvider,
|
|
6242
|
+
[CommentProviderExecute]: executeCommentProvider,
|
|
6194
6243
|
[CompletionResolveExecute]: executeresolveCompletionItemProvider,
|
|
6195
6244
|
[ConfigurationSetConfiguration]: setConfigurations,
|
|
6196
6245
|
[DefinitionExecuteDefinitionProvider]: executeDefinitionProvider,
|