提交 88cba08d 编写于 作者: B Benjamin Pasero

update proposed API with my items and remove deprecations

上级 e7aa84d8
......@@ -1056,7 +1056,7 @@ declare module 'vscode' {
}
//#endregion
//#region Ben - status bar item with ID and Name
//#region Status bar item with ID and Name: https://github.com/microsoft/vscode/issues/74972
export namespace window {
......@@ -1104,26 +1104,6 @@ declare module 'vscode' {
//#endregion
//#region Ben - extension auth flow (desktop+web)
export interface AppUriOptions {
payload?: {
path?: string;
query?: string;
fragment?: string;
};
}
export namespace env {
/**
* @deprecated use `vscode.env.asExternalUri` instead.
*/
export function createAppUri(options?: AppUriOptions): Thenable<Uri>;
}
//#endregion
//#region Custom editors: https://github.com/microsoft/vscode/issues/77131
/**
......
......@@ -72,16 +72,6 @@ export class MainThreadUrls implements MainThreadUrlsShape {
return this.urlService.create(uri);
}
async $proposedCreateAppUri(extensionId: ExtensionIdentifier, options?: { payload?: Partial<UriComponents> }): Promise<URI> {
const payload: Partial<UriComponents> = options && options.payload ? options.payload : Object.create(null);
// we define the authority to be the extension ID to ensure
// that the Uri gets routed back to the extension properly.
payload.authority = extensionId.value;
return this.urlService.create(payload);
}
dispose(): void {
this.handlers.forEach(({ disposable }) => disposable.dispose());
this.handlers.clear();
......
......@@ -225,10 +225,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
get appName() { return initData.environment.appName; },
get appRoot() { return initData.environment.appRoot!.fsPath; },
get uriScheme() { return initData.environment.appUriScheme; },
createAppUri(options?) {
checkProposedApiEnabled(extension);
return extHostUrls.proposedCreateAppUri(extension.identifier, options);
},
get logLevel() {
checkProposedApiEnabled(extension);
return typeConverters.LogLevel.to(extHostLogService.getLevel());
......
......@@ -610,7 +610,6 @@ export interface MainThreadUrlsShape extends IDisposable {
$registerUriHandler(handle: number, extensionId: ExtensionIdentifier): Promise<void>;
$unregisterUriHandler(handle: number): Promise<void>;
$createAppUri(uri: UriComponents): Promise<UriComponents>;
$proposedCreateAppUri(extensionId: ExtensionIdentifier, options?: { payload?: Partial<UriComponents>; }): Promise<UriComponents>;
}
export interface ExtHostUrlsShape {
......
......@@ -59,8 +59,4 @@ export class ExtHostUrls implements ExtHostUrlsShape {
async createAppUri(uri: URI): Promise<vscode.Uri> {
return URI.revive(await this._proxy.$createAppUri(uri));
}
async proposedCreateAppUri(extensionId: ExtensionIdentifier, options?: vscode.AppUriOptions): Promise<vscode.Uri> {
return URI.revive(await this._proxy.$proposedCreateAppUri(extensionId, options));
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册