@@ -62,6 +62,10 @@ const optionalVariables = computed(() => {
6262})
6363
6464const allRequiredFilled = computed (() => {
65+ if (requiredVariables .value .length === 0 ) {
66+ return true // No required variables, so validation passes
67+ }
68+
6569 return requiredVariables .value .every ((env : any ) => {
6670 const value = modelValue .value [env .name ]
6771 // Check if value exists, is not empty, and is not a placeholder
@@ -86,7 +90,7 @@ const missingRequiredFields = computed(() => {
8690const isPlaceholderValue = (value : string , env : any ) => {
8791 if (! value || value .trim ().length === 0 ) return true
8892
89- const trimmedValue = value .trim ()
93+ const trimmedValue = value .trim (). toLowerCase ()
9094
9195 // Check against common placeholder patterns that users might manually enter
9296 const placeholderPatterns = [
@@ -95,11 +99,17 @@ const isPlaceholderValue = (value: string, env: any) => {
9599 ` <${env .name .toLowerCase ()}> ` ,
96100 ' your-api-key-here' ,
97101 ' your-token-here' ,
98- ' your-secret-here'
102+ ' your-secret-here' ,
103+ ' enter-your-key' ,
104+ ' api-key-here' ,
105+ ' token-here' ,
106+ ' secret-here' ,
107+ // Also check against the actual placeholder if it exists
108+ ... (env .placeholder ? [env .placeholder .toLowerCase ().trim ()] : [])
99109 ]
100110
101111 return placeholderPatterns .some (pattern =>
102- pattern && trimmedValue === pattern .trim ()
112+ pattern && ( trimmedValue === pattern .trim (). toLowerCase () || trimmedValue . includes ( pattern . trim (). toLowerCase ()) )
103113 )
104114}
105115
@@ -142,12 +152,12 @@ const updateValue = (envName: string, value: string) => {
142152// Watch for validation state changes and emit to parent
143153watch (validationState , (newState ) => {
144154 emit (' validation-change' , newState .isValid , newState .missingFields )
145- }, { immediate: true })
155+ }, { immediate: true , deep: true })
146156
147157// Watch for model value changes to trigger validation
148158watch (modelValue , () => {
149159 // Validation will be triggered by the validationState watcher
150- }, { deep: true })
160+ }, { deep: true , immediate: true })
151161
152162// Watch for environment variables changes to initialize form values
153163watch (() => environmentVariables .value , (newVariables ) => {
0 commit comments