mirror of
https://github.com/coder/code-server.git
synced 2026-05-09 05:47:26 +02:00
chore(vscode): update to 1.55.2
This commit is contained in:
@@ -7,7 +7,7 @@ import { IURLService, IURLHandler, IOpenURLOptions } from 'vs/platform/url/commo
|
||||
import { URI, UriComponents } from 'vs/base/common/uri';
|
||||
import { first } from 'vs/base/common/async';
|
||||
import { toDisposable, IDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
import product from 'vs/platform/product/common/product';
|
||||
import { IProductService } from 'vs/platform/product/common/productService';
|
||||
|
||||
export abstract class AbstractURLService extends Disposable implements IURLService {
|
||||
|
||||
@@ -30,6 +30,12 @@ export abstract class AbstractURLService extends Disposable implements IURLServi
|
||||
|
||||
export class NativeURLService extends AbstractURLService {
|
||||
|
||||
constructor(
|
||||
@IProductService protected readonly productService: IProductService
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
create(options?: Partial<UriComponents>): URI {
|
||||
let { authority, path, query, fragment } = options ? options : { authority: undefined, path: undefined, query: undefined, fragment: undefined };
|
||||
|
||||
@@ -37,6 +43,6 @@ export class NativeURLService extends AbstractURLService {
|
||||
path = `/${path}`; // URI validation requires a path if there is an authority
|
||||
}
|
||||
|
||||
return URI.from({ scheme: product.urlProtocol, authority, path, query, fragment });
|
||||
return URI.from({ scheme: this.productService.urlProtocol, authority, path, query, fragment });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IEnvironmentMainService } from 'vs/platform/environment/electron-main/environmentMainService';
|
||||
import { IURLService } from 'vs/platform/url/common/url';
|
||||
import product from 'vs/platform/product/common/product';
|
||||
import { IProductService } from 'vs/platform/product/common/productService';
|
||||
import { app, Event as ElectronEvent } from 'electron';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IDisposable, DisposableStore, Disposable } from 'vs/base/common/lifecycle';
|
||||
@@ -43,7 +43,8 @@ export class ElectronURLListener {
|
||||
initialUrisToHandle: { uri: URI, url: string }[],
|
||||
private readonly urlService: IURLService,
|
||||
windowsMainService: IWindowsMainService,
|
||||
environmentMainService: IEnvironmentMainService
|
||||
environmentMainService: IEnvironmentMainService,
|
||||
productService: IProductService
|
||||
) {
|
||||
|
||||
// the initial set of URIs we need to handle once the window is ready
|
||||
@@ -53,7 +54,7 @@ export class ElectronURLListener {
|
||||
if (isWindows) {
|
||||
const windowsParameters = environmentMainService.isBuilt ? [] : [`"${environmentMainService.appRoot}"`];
|
||||
windowsParameters.push('--open-url', '--');
|
||||
app.setAsDefaultProtocolClient(product.urlProtocol, process.execPath, windowsParameters);
|
||||
app.setAsDefaultProtocolClient(productService.urlProtocol, process.execPath, windowsParameters);
|
||||
}
|
||||
|
||||
// macOS: listen to `open-url` events from here on to handle
|
||||
|
||||
Reference in New Issue
Block a user