mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 03:28:33 -05:00
VSCode serialization changed rejection handling to only serialize errors, which caused things to break - Changed to return either account info or a cancel message in the resolve - Rewrote to use promises. Tracking how to return canceled through 4+ thenables was way trickier than just using a promise - Updated unit tests to handle new scenario - Tested integration tests, realized they a) didn't run and b) didn't passed. - Added vscode dev dependency to fix run issue - Fixed tests to account for behavior changes in tree state.
This commit is contained in:
8
src/sql/azdata.proposed.d.ts
vendored
8
src/sql/azdata.proposed.d.ts
vendored
@@ -2327,11 +2327,11 @@ declare module 'azdata' {
|
||||
* AccountProvider.refresh or AccountProvider.prompt are rejected with this error, the error
|
||||
* will not be reported to the user.
|
||||
*/
|
||||
export interface UserCancelledSignInError extends Error {
|
||||
export interface PromptFailedResult {
|
||||
/**
|
||||
* Type guard for differentiating user cancelled sign in errors from other errors
|
||||
*/
|
||||
userCancelledSignIn: boolean;
|
||||
canceled: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2382,7 +2382,7 @@ declare module 'azdata' {
|
||||
* Prompts the user to enter account information.
|
||||
* Returns an error if the user canceled the operation.
|
||||
*/
|
||||
prompt(): Thenable<Account>;
|
||||
prompt(): Thenable<Account | PromptFailedResult>;
|
||||
|
||||
/**
|
||||
* Refreshes a stale account.
|
||||
@@ -2390,7 +2390,7 @@ declare module 'azdata' {
|
||||
* Otherwise, returns a new updated account instance.
|
||||
* @param account - An account.
|
||||
*/
|
||||
refresh(account: Account): Thenable<Account>;
|
||||
refresh(account: Account): Thenable<Account | PromptFailedResult>;
|
||||
|
||||
/**
|
||||
* Clears sensitive information for an account. To be called when account is removed
|
||||
|
||||
Reference in New Issue
Block a user