File tree Expand file tree Collapse file tree 7 files changed +47
-4
lines changed
react/add-ons/better-auth/assets/src
solid/add-ons/better-auth/assets/src Expand file tree Collapse file tree 7 files changed +47
-4
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,9 @@ export async function normalizeOptions(
136136 ] )
137137 if ( cliOptions . addOns && Array . isArray ( cliOptions . addOns ) ) {
138138 for ( const a of cliOptions . addOns ) {
139+ if ( a . toLowerCase ( ) === 'start' ) {
140+ continue
141+ }
139142 selectedAddOns . add ( a )
140143 }
141144 }
Original file line number Diff line number Diff line change @@ -118,6 +118,9 @@ export async function promptForCreateOptions(
118118
119119 if ( Array . isArray ( cliOptions . addOns ) ) {
120120 for ( const addOn of cliOptions . addOns ) {
121+ if ( addOn . toLowerCase ( ) === 'start' ) {
122+ continue
123+ }
121124 addOns . add ( addOn )
122125 }
123126 } else {
Original file line number Diff line number Diff line change @@ -218,6 +218,35 @@ describe('normalizeOptions', () => {
218218 expect ( options ?. typescript ) . toBe ( true )
219219 } )
220220
221+ it ( 'should ignore legacy start add-on id from exported commands' , async ( ) => {
222+ __testRegisterFramework ( {
223+ id : 'react-cra' ,
224+ name : 'react' ,
225+ getAddOns : ( ) => [
226+ {
227+ id : 'tanstack-query' ,
228+ name : 'TanStack Query' ,
229+ modes : [ 'file-router' ] ,
230+ } ,
231+ {
232+ id : 'nitro' ,
233+ name : 'nitro' ,
234+ modes : [ 'file-router' ] ,
235+ default : true ,
236+ } ,
237+ ] ,
238+ } )
239+
240+ const options = await normalizeOptions ( {
241+ projectName : 'test' ,
242+ addOns : [ 'start' , 'tanstack-query' ] ,
243+ framework : 'react-cra' ,
244+ } )
245+
246+ expect ( options ?. chosenAddOns . map ( ( a ) => a . id ) ) . toContain ( 'tanstack-query' )
247+ expect ( options ?. chosenAddOns . map ( ( a ) => a . id ) ) . not . toContain ( 'start' )
248+ } )
249+
221250 it ( 'should handle toolchain as an addon' , async ( ) => {
222251 __testRegisterFramework ( {
223252 id : 'react-cra' ,
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ export default function BetterAuthHeader() {
2323 </ div >
2424 ) }
2525 < button
26- onClick = { ( ) => authClient . signOut ( ) }
26+ onClick = { ( ) => {
27+ void authClient . signOut ( )
28+ } }
2729 className = "flex-1 h-9 px-4 text-sm font-medium bg-white dark:bg-neutral-900 text-neutral-900 dark:text-neutral-50 border border-neutral-300 dark:border-neutral-700 hover:bg-neutral-50 dark:hover:bg-neutral-800 transition-colors"
2830 >
2931 Sign out
Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ function BetterAuthDemo() {
5757 </ div >
5858
5959 < button
60- onClick = { ( ) => authClient . signOut ( ) }
60+ onClick = { ( ) => {
61+ void authClient . signOut ( )
62+ } }
6163 className = "w-full h-9 px-4 text-sm font-medium border border-neutral-300 dark:border-neutral-700 hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors"
6264 >
6365 Sign out
Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ export default function BetterAuthHeader() {
3838 { ( image ) => < img src = { image ( ) } alt = "" class = "h-8 w-8" /> }
3939 </ Show >
4040 < button
41- onClick = { ( ) => authClient . signOut ( ) }
41+ onClick = { ( ) => {
42+ void authClient . signOut ( ) ;
43+ } }
4244 class = "flex-1 h-9 px-4 text-sm font-medium bg-white dark:bg-neutral-900 text-neutral-900 dark:text-neutral-50 border border-neutral-300 dark:border-neutral-700 hover:bg-neutral-50 dark:hover:bg-neutral-800 transition-colors"
4345 >
4446 Sign out
Original file line number Diff line number Diff line change @@ -210,7 +210,9 @@ function BetterAuthDemo() {
210210 </ div >
211211
212212 < button
213- onClick = { ( ) => authClient . signOut ( ) }
213+ onClick = { ( ) => {
214+ void authClient . signOut ( ) ;
215+ } }
214216 class = "w-full h-9 px-4 text-sm font-medium border border-neutral-300 dark:border-neutral-700 hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors"
215217 >
216218 Sign out
You can’t perform that action at this time.
0 commit comments