File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 108108 }
109109 ]
110110 }
111- ]
111+ ]
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import type { RepoScanSummary } from "@/types/repo-scan"
55import type { LoadedConvention } from "@/types/conventions"
66import type { WizardResponses } from "@/types/wizard"
77
8- const STACK_FALLBACK = "react "
8+ const STACK_FALLBACK = "unsupported "
99
1010const toLowerArray = ( values : string [ ] | undefined | null ) =>
1111 Array . isArray ( values ) ? values . map ( ( value ) => value . toLowerCase ( ) ) : [ ]
@@ -49,6 +49,7 @@ const applyDetectedValue = <Key extends keyof WizardResponses>(
4949const detectStack = ( scan : RepoScanSummary ) : string => {
5050 const frameworks = toLowerArray ( scan . frameworks )
5151 const languages = toLowerArray ( scan . languages )
52+ const primaryLanguage = scan . language ? scan . language . trim ( ) . toLowerCase ( ) : null
5253
5354 if ( frameworks . some ( ( name ) => / n e x t \. ? j s / . test ( name ) ) ) return "nextjs"
5455 if ( frameworks . includes ( "nuxt" ) ) return "nuxt"
@@ -59,6 +60,8 @@ const detectStack = (scan: RepoScanSummary): string => {
5960 if ( frameworks . includes ( "svelte" ) ) return "svelte"
6061 if ( frameworks . includes ( "react" ) ) return "react"
6162 if ( languages . includes ( "python" ) ) return "python"
63+
64+ // No known framework detected; mark as unsupported instead of falling back
6265 return STACK_FALLBACK
6366}
6467
You can’t perform that action at this time.
0 commit comments