Skip to content

Commit 55e233e

Browse files
committed
refactor canceled to cancelled
1 parent 2a4d097 commit 55e233e

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/plugins/setup.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ export default createPlugin(
126126
message:
127127
"Waiting for authentication response from the browser...",
128128
});
129-
const { authToken, canceled } = await minDelay(
129+
const { authToken, cancelled } = await minDelay(
130130
requestAuthentication(context, cancellationToken),
131131
);
132-
if (canceled) {
132+
if (cancelled) {
133133
void window.showWarningMessage("Authentication cancelled.");
134134
}
135-
if (canceled || cancellationToken.isCancellationRequested) {
135+
if (cancelled || cancellationToken.isCancellationRequested) {
136136
telemetry.track({
137137
name: "auth_token_configured",
138138
payload: {

src/utils/authenticate.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export async function requestAuthentication(
2323
context: ExtensionContext,
2424
cancellationToken?: CancellationToken,
2525
): Promise<
26-
| { authToken: string; canceled?: undefined }
27-
| { authToken?: undefined; canceled: true }
26+
| { authToken: string; cancelled?: undefined }
27+
| { authToken?: undefined; cancelled: true }
2828
> {
2929
return new Promise((resolve, reject) => {
3030
const uriHandler = window.registerUriHandler({
@@ -45,19 +45,19 @@ export async function requestAuthentication(
4545
context.subscriptions.push(uriHandler);
4646
cancellationToken?.onCancellationRequested(() => {
4747
uriHandler.dispose();
48-
resolve({ canceled: true });
48+
resolve({ cancelled: true });
4949
});
5050

51-
void redirectToLocalStack().then(({ canceled }) => {
52-
if (canceled) {
51+
void redirectToLocalStack().then(({ cancelled }) => {
52+
if (cancelled) {
5353
uriHandler.dispose();
54-
resolve({ canceled: true });
54+
resolve({ cancelled: true });
5555
}
5656
});
5757
});
5858
}
5959

60-
async function redirectToLocalStack(): Promise<{ canceled: boolean }> {
60+
async function redirectToLocalStack(): Promise<{ cancelled: boolean }> {
6161
// You don't have to get the Uri from the `env.asExternalUri` API but it will add a query
6262
// parameter (ex: "windowId%3D14") that will help VS Code decide which window to redirect to.
6363
// If this query parameter isn't specified, VS Code will pick the last windows that was focused.
@@ -77,11 +77,11 @@ async function redirectToLocalStack(): Promise<{ canceled: boolean }> {
7777
"Continue",
7878
);
7979
if (!selection) {
80-
return { canceled: true };
80+
return { cancelled: true };
8181
}
8282

8383
const openSuccessful = await env.openExternal(Uri.parse(url.toString()));
84-
return { canceled: !openSuccessful };
84+
return { cancelled: !openSuccessful };
8585
}
8686

8787
const LOCALSTACK_AUTH_FILENAME = `${os.homedir()}/.localstack/auth.json`;

0 commit comments

Comments
 (0)