{#each variables as variable, index (index)} {@const source = getSource(variable.key)} {@const isVarRequired = isRequired(variable.key)} {@const isVarOptional = isOptional(variable.key)} {@const isVarMissing = isMissing(variable.key)} {@const isVarUnused = isUnused(variable.key)}
{#if showSource}
{#if source === 'file'}

From env file in repository

{:else if source === 'override'} {#if fileValues[variable.key] !== undefined} {:else} {/if}

{fileValues[variable.key] !== undefined ? 'Revert to file value' : 'Manual override (not in file)'}

{/if}
{/if} {#if validation}
{#if variable.key} {#if isVarRequired && !isVarMissing}

Required variable defined

{:else if isVarOptional}

Optional variable (has default)

{:else if isVarUnused}

Unused variable

{/if} {/if}
{/if}
Name onchange?.()} class="h-9 font-mono text-xs" />
Value onchange?.()} class="h-9 font-mono text-xs" />
{#if !readonly} {@const existingSecret = isExistingSecret(variable.key, variable.isSecret)} {#if existingSecret}
{:else} {/if} {:else if variable.isSecret}
{/if} {#if !readonly} {/if}
{/each} {#if variables.length === 0}

No environment variables defined.

{#if !readonly} {/if}
{/if}