@lvce-editor/extension-management-worker 4.81.2 → 4.82.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.
|
@@ -4588,6 +4588,24 @@ const executeOrganizeImportsProvider = async (extensionsState, textDocument) =>
|
|
|
4588
4588
|
result
|
|
4589
4589
|
};
|
|
4590
4590
|
};
|
|
4591
|
+
const executeSourceActionProvider = async (extensionsState, textDocument, kind) => {
|
|
4592
|
+
const {
|
|
4593
|
+
assetDir,
|
|
4594
|
+
platform
|
|
4595
|
+
} = await getRuntimeContext('', extensionsState.platform);
|
|
4596
|
+
const extensions = await getMatchingExtensions$2(extensionsState, 'code action', textDocument, assetDir, platform);
|
|
4597
|
+
if (extensions.length === 0) {
|
|
4598
|
+
return {
|
|
4599
|
+
found: false
|
|
4600
|
+
};
|
|
4601
|
+
}
|
|
4602
|
+
const rpc = await getRpc$1(extensions[0], assetDir, platform);
|
|
4603
|
+
const result = await rpc.invoke('ExtensionApi.executeSourceActionProvider', textDocument, kind);
|
|
4604
|
+
return {
|
|
4605
|
+
found: true,
|
|
4606
|
+
result
|
|
4607
|
+
};
|
|
4608
|
+
};
|
|
4591
4609
|
|
|
4592
4610
|
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
4593
4611
|
|
|
@@ -4934,6 +4952,9 @@ const createViewInstance = async (viewId, uid, context, assetDir, platform, appl
|
|
|
4934
4952
|
} = await getViewMetadata(rpc, viewId);
|
|
4935
4953
|
const result = await rpc.invoke('ExtensionApi.createViewInstance', viewId, uid, context);
|
|
4936
4954
|
set$1(uid, {
|
|
4955
|
+
...(applicationId && {
|
|
4956
|
+
applicationId
|
|
4957
|
+
}),
|
|
4937
4958
|
context,
|
|
4938
4959
|
disposeWorkerWhenLastViewCloses,
|
|
4939
4960
|
extensionId,
|
|
@@ -5013,7 +5034,11 @@ const setViewInstanceActive = async (viewId, uid, active, assetDir, platform) =>
|
|
|
5013
5034
|
throw error;
|
|
5014
5035
|
}
|
|
5015
5036
|
};
|
|
5016
|
-
const requestViewRerender = async uid => {
|
|
5037
|
+
const requestViewRerender = async (uid, applicationId) => {
|
|
5038
|
+
const instance = get$1(uid);
|
|
5039
|
+
if (applicationId !== undefined && (instance?.status !== 'ready' || instance.applicationId !== applicationId)) {
|
|
5040
|
+
throw new Error(`view instance ${uid} does not belong to application ${applicationId}`);
|
|
5041
|
+
}
|
|
5017
5042
|
await invoke$4('Viewlet.executeViewletCommand', uid, 'rerender');
|
|
5018
5043
|
};
|
|
5019
5044
|
const showViewContextMenu = async (uid, viewId, menuId, x, y) => {
|
|
@@ -6242,6 +6267,8 @@ const invokeForApplication = async (applicationId, method, ...args) => {
|
|
|
6242
6267
|
}
|
|
6243
6268
|
case 'Extensions.handleFileChanges':
|
|
6244
6269
|
return handleFileChanges(args[0], applicationId);
|
|
6270
|
+
case 'Extensions.requestViewRerender':
|
|
6271
|
+
return requestViewRerender(args[0], applicationId);
|
|
6245
6272
|
case 'Extensions.sendMessagePortToFileSystemWorker':
|
|
6246
6273
|
return createFileSystemPort(application, args[0]);
|
|
6247
6274
|
case 'Extensions.showNotification':
|
|
@@ -6313,6 +6340,7 @@ const commandMap = {
|
|
|
6313
6340
|
'Extensions.executeProvidersByEvent': wrapCommand(executeProvidersByEvent),
|
|
6314
6341
|
'Extensions.executeResolveCompletionItemProvider': wrapCommand(executeResolveCompletionItemProvider),
|
|
6315
6342
|
'Extensions.executeSignatureHelpProvider': wrapCommand(executeSignatureHelpProvider),
|
|
6343
|
+
'Extensions.executeSourceActionProvider': wrapCommand(executeSourceActionProvider),
|
|
6316
6344
|
'Extensions.executeSourceControlProvider': wrapCommand(executeSourceControlProvider),
|
|
6317
6345
|
'Extensions.executeWorkspaceRequest': request,
|
|
6318
6346
|
'Extensions.getAccessToken': getAccessToken,
|