Skip to content

fix: env vars and os config - #46

Merged
brunozoric merged 2 commits into
mainfrom
bruno/fix/env-vars-and-os-config
Sep 8, 2026
Merged

fix: env vars and os config#46
brunozoric merged 2 commits into
mainfrom
bruno/fix/env-vars-and-os-config

Conversation

@brunozoric

@brunozoric brunozoric commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • writeEnv supports both .env.example formats: {{TOKEN}} placeholders (substituted as before) and plain KEY=value lines (parsed and replaced). Commented-out known keys are uncommented and filled in. Missing known keys are appended at the end. Falls back to the built-in template when no .env.example exists.
  • Config template auto-enables OpenSearch: the opensearch block is now always present but conditionally built — null when SOURCE_OS_TABLE / TARGET_OS_TABLE are empty, full config when set. No manual uncommenting needed.
  • Fixes older scaffolded projects where OS keys were commented out and account/audit keys were missing entirely.

Test plan

  • yarn transfer wizard on a project with an old .env.example (OS keys commented out) — .env should have all keys filled
  • yarn transfer wizard on a project with no .env.example — built-in template used
  • Config loads correctly with OS env vars set (opensearch active) and without (opensearch null)
  • yarn full — all tests pass

🤖 Generated with Claude Code

brunozoric and others added 2 commits September 8, 2026 12:54
… config

envWriter: supports both {{TOKEN}} and plain KEY=value .env.example formats.
Plain format uncomments commented-out known keys and appends missing ones,
so older scaffolded projects get all values populated.

Config template: opensearch block is now always active — conditionally
builds from env vars (null when SOURCE_OS_TABLE / TARGET_OS_TABLE are
empty, full config when set). No manual uncommenting needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@brunozoric
brunozoric merged commit 74a0a2f into main Sep 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant