File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
src/commands/login/oauth2 Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 1- import * as http from "http" ;
21import * as fs from "fs/promises" ;
2+ import * as http from "http" ;
33import * as path from "path" ;
44import * as vscode from "vscode" ;
55import { GlobalArgs } from "../../../globalArgs" ;
@@ -22,8 +22,7 @@ const createServer = (
2222 } ) . listen ( port , ( ) =>
2323 console . info (
2424 `Listening for OAuth callback on http://127.0.0.1:${ port } /callback` ,
25- ) ,
26- ) ;
25+ ) ) ;
2726} ;
2827
2928export const getAvailablePort = async ( ) : Promise < number > => {
@@ -39,9 +38,7 @@ export const getAvailablePort = async (): Promise<number> => {
3938 }
4039 } ) ;
4140
42- tempServer . on ( "error" , ( error : any ) =>
43- reject ( new Error ( `Error finding available port: ${ error . message } ` ) ) ,
44- ) ;
41+ tempServer . on ( "error" , ( error : any ) => reject ( new Error ( `Error finding available port: ${ error . message } ` ) ) ) ;
4542 } ) ;
4643} ;
4744
Original file line number Diff line number Diff line change @@ -6,10 +6,7 @@ import * as vscode from "vscode";
66import { isUserConnected } from "../../../credentials" ;
77import { base64UrlSafeEncode } from "../../utils" ;
88import { clientId , createCredentials } from "../createCredentials" ;
9- import {
10- getAvailablePort ,
11- startLocalServerForCallback ,
12- } from "./callbackServer" ;
9+ import { getAvailablePort , startLocalServerForCallback } from "./callbackServer" ;
1310
1411function authorizeUrl ( clientId : string , redirectUri : URL , state : string ) : URL {
1512 const baseUrl = new URL ( "/oauth2/authorize" , GlobalArgs . aqoraUrl ( ) ) ;
You can’t perform that action at this time.
0 commit comments