mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 00:59:03 +01:00
Remove old portMapping api conversion logic
This commit is contained in:
@@ -452,20 +452,10 @@ function convertWebviewOptions(
|
||||
): modes.IWebviewOptions {
|
||||
return {
|
||||
...options,
|
||||
portMapping: options.portMapping
|
||||
? options.portMapping.map((x): modes.IWebviewPortMapping => {
|
||||
// Handle old proposed api
|
||||
if ('port' in x) {
|
||||
return { webviewPort: (x as any).port, extensionHostPort: (x as any).resolvedPort };
|
||||
}
|
||||
return { webviewPort: x.webviewPort, extensionHostPort: x.extensionHostPort };
|
||||
})
|
||||
: undefined,
|
||||
localResourceRoots: options.localResourceRoots || getDefaultLocalResourceRoots(extension, workspace)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function getDefaultLocalResourceRoots(
|
||||
extension: IExtensionDescription,
|
||||
workspace: IExtHostWorkspace | undefined,
|
||||
|
||||
Reference in New Issue
Block a user