File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 3
3
import { defineCommand } from "citty"
4
4
import consola from "consola"
5
5
6
- import { PATHS } from "./lib/paths"
6
+ import { ensurePaths , PATHS } from "./lib/paths"
7
+ import { state } from "./lib/state"
7
8
import { setupGitHubToken } from "./lib/token"
9
+ import { cacheVSCodeVersion } from "./lib/vscode-version"
8
10
9
11
interface RunAuthOptions {
10
12
verbose: boolean
13
+ business: boolean
11
14
}
12
15
13
16
export async function runAuth ( options : RunAuthOptions ) : Promise < void > {
@@ -16,6 +19,14 @@ export async function runAuth(options: RunAuthOptions): Promise<void> {
16
19
consola . info ( "Verbose logging enabled" )
17
20
}
18
21
22
+ if ( options . business ) {
23
+ state . accountType = "business"
24
+ consola . info ( "Using business plan GitHub account" )
25
+ }
26
+
27
+ await ensurePaths ( )
28
+ await cacheVSCodeVersion ( )
29
+
19
30
await setupGitHubToken ( { force : true } )
20
31
consola . success ( "GitHub token written to" , PATHS . GITHUB_TOKEN_PATH )
21
32
}
@@ -32,10 +43,16 @@ export const auth = defineCommand({
32
43
default : false ,
33
44
description : "Enable verbose logging" ,
34
45
} ,
46
+ business : {
47
+ type : "boolean" ,
48
+ default : false ,
49
+ description : "Use a business plan GitHub Account" ,
50
+ } ,
35
51
} ,
36
52
run ( { args } ) {
37
53
return runAuth ( {
38
54
verbose : args . verbose ,
55
+ business : args . business ,
39
56
} )
40
57
} ,
41
58
} )
You can’t perform that action at this time.
0 commit comments