Merge from vscode cfbd1999769f4f08dce29629fb92fdc0fac53829

This commit is contained in:
ADS Merger
2020-08-06 07:08:52 +00:00
parent 9c67832880
commit 540046ba00
362 changed files with 7588 additions and 6584 deletions

View File

@@ -18,59 +18,6 @@ declare module 'vscode' {
// #region auth provider: https://github.com/microsoft/vscode/issues/88309
export interface AuthenticationSession {
/**
* The identifier of the authentication session.
*/
readonly id: string;
/**
* The access token.
*/
readonly accessToken: string;
/**
* The account associated with the session.
*/
readonly account: AuthenticationSessionAccountInformation;
/**
* The permissions granted by the session's access token. Available scopes
* are defined by the authentication provider.
*/
readonly scopes: ReadonlyArray<string>;
}
/**
* The information of an account associated with an authentication session.
*/
export interface AuthenticationSessionAccountInformation {
/**
* The unique identifier of the account.
*/
readonly id: string;
/**
* The human-readable name of the account.
*/
readonly label: string;
}
/**
* Basic information about an[authenticationProvider](#AuthenticationProvider)
*/
export interface AuthenticationProviderInformation {
/**
* The unique identifier of the authentication provider.
*/
readonly id: string;
/**
* The human-readable name of the authentication provider.
*/
readonly label: string;
}
/**
* An [event](#Event) which fires when an [AuthenticationProvider](#AuthenticationProvider) is added or removed.
*/
@@ -86,33 +33,10 @@ declare module 'vscode' {
readonly removed: ReadonlyArray<AuthenticationProviderInformation>;
}
/**
* Options to be used when getting a session from an [AuthenticationProvider](#AuthenticationProvider).
*/
export interface AuthenticationGetSessionOptions {
/**
* Whether login should be performed if there is no matching session. Defaults to false.
*/
createIfNone?: boolean;
/**
* Whether the existing user session preference should be cleared. Set to allow the user to switch accounts.
* Defaults to false.
*/
clearSessionPreference?: boolean;
}
export interface AuthenticationProviderAuthenticationSessionsChangeEvent {
/**
* The [authenticationProvider](#AuthenticationProvider) that has had its sessions change.
*/
readonly provider: AuthenticationProviderInformation;
}
/**
* An [event](#Event) which fires when an [AuthenticationSession](#AuthenticationSession) is added, removed, or changed.
*/
export interface AuthenticationSessionsChangeEvent {
export interface AuthenticationProviderAuthenticationSessionsChangeEvent {
/**
* The ids of the [AuthenticationSession](#AuthenticationSession)s that have been added.
*/
@@ -156,7 +80,7 @@ declare module 'vscode' {
* An [event](#Event) which fires when the array of sessions has changed, or data
* within a session has changed.
*/
readonly onDidChangeSessions: Event<AuthenticationSessionsChangeEvent>;
readonly onDidChangeSessions: Event<AuthenticationProviderAuthenticationSessionsChangeEvent>;
/**
* Returns an array of current sessions.
@@ -210,30 +134,6 @@ declare module 'vscode' {
*/
export const providers: ReadonlyArray<AuthenticationProviderInformation>;
/**
* Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
* registered, or if the user does not consent to sharing authentication information with
* the extension. If there are multiple sessions with the same scopes, the user will be shown a
* quickpick to select which account they would like to use.
* @param providerId The id of the provider to use
* @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
* @param options The [getSessionOptions](#GetSessionOptions) to use
* @returns A thenable that resolves to an authentication session
*/
export function getSession(providerId: string, scopes: string[], options: AuthenticationGetSessionOptions & { createIfNone: true }): Thenable<AuthenticationSession>;
/**
* Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
* registered, or if the user does not consent to sharing authentication information with
* the extension. If there are multiple sessions with the same scopes, the user will be shown a
* quickpick to select which account they would like to use.
* @param providerId The id of the provider to use
* @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
* @param options The [getSessionOptions](#GetSessionOptions) to use
* @returns A thenable that resolves to an authentication session if available, or undefined if there are no sessions
*/
export function getSession(providerId: string, scopes: string[], options: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>;
/**
* @deprecated
* Logout of a specific session.
@@ -242,13 +142,6 @@ declare module 'vscode' {
* provider
*/
export function logout(providerId: string, sessionId: string): Thenable<void>;
/**
* An [event](#Event) which fires when the array of sessions has changed, or data
* within a session has changed for a provider. Fires with the ids of the providers
* that have had session data change.
*/
export const onDidChangeSessions: Event<AuthenticationProviderAuthenticationSessionsChangeEvent>;
}
//#endregion
@@ -358,13 +251,14 @@ declare module 'vscode' {
export interface ResourceLabelFormatting {
label: string; // myLabel:/${path}
// TODO@isidorn
// For historic reasons we use an or string here. Once we finalize this API we should start using enums instead and adopt it in extensions.
// eslint-disable-next-line vscode-dts-literal-or-types
separator: '/' | '\\' | '';
tildify?: boolean;
normalizeDriveLetter?: boolean;
workspaceSuffix?: string;
authorityPrefix?: string;
stripPathStartingSeparator?: boolean;
}
export namespace workspace {
@@ -1087,8 +981,10 @@ declare module 'vscode' {
* even before previous calls resolve, make sure to not share global objects (eg. `RegExp`)
* that could have problems when asynchronous usage may overlap.
* @param context Information about what links are being provided for.
* @param token A cancellation token.
* @return A list of terminal links for the given line.
*/
provideTerminalLinks(context: TerminalLinkContext): ProviderResult<T[]>
provideTerminalLinks(context: TerminalLinkContext, token: CancellationToken): ProviderResult<T[]>
/**
* Handle an activated terminal link.
@@ -1461,6 +1357,16 @@ declare module 'vscode' {
*/
lastRunDuration?: number;
/**
* Whether a code cell's editor is collapsed
*/
inputCollapsed?: boolean;
/**
* Whether a code cell's outputs are collapsed
*/
outputCollapsed?: boolean;
/**
* Additional attributes of a cell metadata.
*/
@@ -1526,6 +1432,7 @@ declare module 'vscode' {
readonly fileName: string;
readonly viewType: string;
readonly isDirty: boolean;
readonly isUntitled: boolean;
readonly cells: NotebookCell[];
languages: string[];
displayOrder?: GlobPattern[];
@@ -1693,6 +1600,11 @@ declare module 'vscode' {
readonly language: string;
}
export interface NotebookCellMetadataChangeEvent {
readonly document: NotebookDocument;
readonly cell: NotebookCell;
}
export interface NotebookCellData {
readonly cellKind: CellKind;
readonly source: string;
@@ -1869,6 +1781,7 @@ declare module 'vscode' {
export const onDidOpenNotebookDocument: Event<NotebookDocument>;
export const onDidCloseNotebookDocument: Event<NotebookDocument>;
export const onDidSaveNotebookDocument: Event<NotebookDocument>;
/**
* All currently known notebook documents.
@@ -1883,6 +1796,7 @@ declare module 'vscode' {
export const onDidChangeNotebookCells: Event<NotebookCellsChangeEvent>;
export const onDidChangeCellOutputs: Event<NotebookCellOutputsChangeEvent>;
export const onDidChangeCellLanguage: Event<NotebookCellLanguageChangeEvent>;
export const onDidChangeCellMetadata: Event<NotebookCellMetadataChangeEvent>;
/**
* Create a document that is the concatenation of all notebook cells. By default all code-cells are included
* but a selector can be provided to narrow to down the set of cells.