File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,19 +38,17 @@ const choices = Object.entries(providers)
3838/** @param {string | undefined } providerId */
3939export async function action ( providerId ) {
4040 try {
41- const pid =
42- providerId ??
43- ( await select ( {
44- message : "What provider do you want to set up?" ,
45- choices : choices ,
46- } ) )
47-
48- const provider = providers [ pid ]
41+ providerId ??= await select ( {
42+ message : "What provider do you want to set up?" ,
43+ choices : choices ,
44+ } )
45+
46+ const provider = providers [ providerId ]
4947 if ( ! provider ?. setupUrl ) {
5048 console . error (
5149 y . red (
5250 `Missing instructions for ${
53- provider ?. name ?? pid
51+ provider ?. name ?? providerId
5452 } .\nInstructions are available for: ${ y . bold (
5553 choices . map ( ( choice ) => choice . name ) . join ( ", " )
5654 ) } `
@@ -135,7 +133,7 @@ ${y.bold("Callback URL (copied to clipboard)")}: ${url}`
135133
136134 console . log ( y . dim ( "Updating environment variable file..." ) )
137135
138- const varPrefix = `AUTH_${ pid . toUpperCase ( ) } `
136+ const varPrefix = `AUTH_${ providerId . toUpperCase ( ) } `
139137 await updateEnvFile ( {
140138 [ `${ varPrefix } _ID` ] : clientId ,
141139 [ `${ varPrefix } _SECRET` ] : clientSecret ,
You can’t perform that action at this time.
0 commit comments