@lvce-editor/editor-worker 19.26.1 → 19.26.2
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/dist/editorWorkerMain.js +37 -45
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -11078,7 +11078,7 @@ const getSourceActions = async editorUid => {
|
|
|
11078
11078
|
const actions = await getEditorSourceActions(editorUid);
|
|
11079
11079
|
return actions;
|
|
11080
11080
|
};
|
|
11081
|
-
const getDiagnostics$
|
|
11081
|
+
const getDiagnostics$1 = async editorUid => {
|
|
11082
11082
|
const editor = getEditor(editorUid);
|
|
11083
11083
|
const {
|
|
11084
11084
|
diagnostics
|
|
@@ -11566,54 +11566,14 @@ const getMenuIds = () => {
|
|
|
11566
11566
|
return [Editor$1];
|
|
11567
11567
|
};
|
|
11568
11568
|
|
|
11569
|
-
const getTextDocument = editor => {
|
|
11570
|
-
return {
|
|
11571
|
-
documentId: editor.id || editor.uid,
|
|
11572
|
-
languageId: editor.languageId,
|
|
11573
|
-
text: getText$1(editor),
|
|
11574
|
-
uri: editor.uri
|
|
11575
|
-
};
|
|
11576
|
-
};
|
|
11577
|
-
const executeIsolatedDiagnosticProvider = async editor => {
|
|
11578
|
-
const textDocument = getTextDocument(editor);
|
|
11579
|
-
return invoke$e('Extensions.executeDiagnosticProvider', textDocument);
|
|
11580
|
-
};
|
|
11581
|
-
const executeDiagnosticProvider = async editor => {
|
|
11582
|
-
const isolatedDiagnostics = await executeIsolatedDiagnosticProvider(editor);
|
|
11583
|
-
if (isolatedDiagnostics.length > 0) {
|
|
11584
|
-
return isolatedDiagnostics;
|
|
11585
|
-
}
|
|
11586
|
-
const {
|
|
11587
|
-
assetDir,
|
|
11588
|
-
platform
|
|
11589
|
-
} = editor;
|
|
11590
|
-
return execute({
|
|
11591
|
-
args: [],
|
|
11592
|
-
assetDir,
|
|
11593
|
-
editor,
|
|
11594
|
-
event: OnDiagnostic,
|
|
11595
|
-
method: 'ExtensionHost.executeDiagnosticProvider',
|
|
11596
|
-
noProviderFoundMessage: 'no diagnostic provider found',
|
|
11597
|
-
platform
|
|
11598
|
-
});
|
|
11599
|
-
};
|
|
11600
|
-
|
|
11601
|
-
const getDiagnostics$1 = editor => {
|
|
11602
|
-
return executeDiagnosticProvider(editor);
|
|
11603
|
-
};
|
|
11604
11569
|
const getProblems = async () => {
|
|
11605
|
-
// TODO maybe combine querying diagnostics for problems view with diagnostics for editor
|
|
11606
|
-
// or query the diagnostics for the problems view directtly from the extension host worker
|
|
11607
11570
|
const keys = getKeys$2();
|
|
11608
|
-
const
|
|
11571
|
+
const diagnostics = keys.flatMap(key => {
|
|
11609
11572
|
const numericKey = Number(key);
|
|
11610
11573
|
const editor = get$7(numericKey);
|
|
11611
|
-
return editor;
|
|
11574
|
+
return editor.newState.diagnostics;
|
|
11612
11575
|
});
|
|
11613
|
-
|
|
11614
|
-
const diagnostics = await Promise.all(newEditors.map(getDiagnostics$1));
|
|
11615
|
-
const flatDiagnostics = diagnostics.flat();
|
|
11616
|
-
return flatDiagnostics;
|
|
11576
|
+
return diagnostics;
|
|
11617
11577
|
};
|
|
11618
11578
|
|
|
11619
11579
|
const getQuickPickMenuEntries = () => {
|
|
@@ -13227,6 +13187,38 @@ const updateDebugInfo = async debugId => {
|
|
|
13227
13187
|
await invoke$b('Editor.rerender', key);
|
|
13228
13188
|
};
|
|
13229
13189
|
|
|
13190
|
+
const getTextDocument = editor => {
|
|
13191
|
+
return {
|
|
13192
|
+
documentId: editor.id || editor.uid,
|
|
13193
|
+
languageId: editor.languageId,
|
|
13194
|
+
text: getText$1(editor),
|
|
13195
|
+
uri: editor.uri
|
|
13196
|
+
};
|
|
13197
|
+
};
|
|
13198
|
+
const executeIsolatedDiagnosticProvider = async editor => {
|
|
13199
|
+
const textDocument = getTextDocument(editor);
|
|
13200
|
+
return invoke$e('Extensions.executeDiagnosticProvider', textDocument);
|
|
13201
|
+
};
|
|
13202
|
+
const executeDiagnosticProvider = async editor => {
|
|
13203
|
+
const isolatedDiagnostics = await executeIsolatedDiagnosticProvider(editor);
|
|
13204
|
+
if (isolatedDiagnostics.length > 0) {
|
|
13205
|
+
return isolatedDiagnostics;
|
|
13206
|
+
}
|
|
13207
|
+
const {
|
|
13208
|
+
assetDir,
|
|
13209
|
+
platform
|
|
13210
|
+
} = editor;
|
|
13211
|
+
return execute({
|
|
13212
|
+
args: [],
|
|
13213
|
+
assetDir,
|
|
13214
|
+
editor,
|
|
13215
|
+
event: OnDiagnostic,
|
|
13216
|
+
method: 'ExtensionHost.executeDiagnosticProvider',
|
|
13217
|
+
noProviderFoundMessage: 'no diagnostic provider found',
|
|
13218
|
+
platform
|
|
13219
|
+
});
|
|
13220
|
+
};
|
|
13221
|
+
|
|
13230
13222
|
const getDiagnosticType = diagnostic => {
|
|
13231
13223
|
return diagnostic.type;
|
|
13232
13224
|
};
|
|
@@ -13445,7 +13437,7 @@ const commandMap = {
|
|
|
13445
13437
|
'Editor.fold': wrapCommand(fold$1),
|
|
13446
13438
|
'Editor.format': wrapCommand(format),
|
|
13447
13439
|
'Editor.getCommandIds': getCommandIds,
|
|
13448
|
-
'Editor.getDiagnostics': getDiagnostics$
|
|
13440
|
+
'Editor.getDiagnostics': getDiagnostics$1,
|
|
13449
13441
|
'Editor.getKeyBindings': getKeyBindings,
|
|
13450
13442
|
'Editor.getKeys': getKeys$1,
|
|
13451
13443
|
'Editor.getLanguageId': getLanguageId,
|