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 33import { defineCommand } from "citty"
44import consola from "consola"
55
6- import { PATHS } from "./lib/paths"
6+ import { ensurePaths , PATHS } from "./lib/paths"
7+ import { state } from "./lib/state"
78import { setupGitHubToken } from "./lib/token"
9+ import { cacheVSCodeVersion } from "./lib/vscode-version"
810
911interface RunAuthOptions {
1012 verbose: boolean
13+ business: boolean
1114}
1215
1316export async function runAuth ( options : RunAuthOptions ) : Promise < void > {
@@ -16,6 +19,14 @@ export async function runAuth(options: RunAuthOptions): Promise<void> {
1619 consola . info ( "Verbose logging enabled" )
1720 }
1821
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+
1930 await setupGitHubToken ( { force : true } )
2031 consola . success ( "GitHub token written to" , PATHS . GITHUB_TOKEN_PATH )
2132}
@@ -32,10 +43,16 @@ export const auth = defineCommand({
3243 default : false ,
3344 description : "Enable verbose logging" ,
3445 } ,
46+ business : {
47+ type : "boolean" ,
48+ default : false ,
49+ description : "Use a business plan GitHub Account" ,
50+ } ,
3551 } ,
3652 run ( { args } ) {
3753 return runAuth ( {
3854 verbose : args . verbose ,
55+ business : args . business ,
3956 } )
4057 } ,
4158} )
You can’t perform that action at this time.
0 commit comments