Create envDefaults.ts - #43
Open
mspandey wants to merge 2 commits into
Open
Conversation
Add bootstrapEnv function to read and write .env files with defaults
Author
|
sorry I by mistake raised 2 same pr for one issue pls look into this pr |
Owner
|
@mspandey, also if possible provide ss/video of running the implementation of this feature, it makes reviewing easier |
Owner
|
@mspandey, plz replay within 24 hrs with any update on progress or atleast respond so I know u got the feedback. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Pull Request
Description
This PR enhances the environment bootstrap workflow in RepoStart by automatically replacing common placeholder or empty environment variable values with sensible local development defaults when generating a
.envfile from.env.example.Summary of Changes:
src/utils/envDefaults.ts): Added a parsing engine that recognizes common database and service variables (MONGO_URI,DATABASE_URL,REDIS_URL) and detects empty or well-defined placeholders (YOUR_MONGODB_URI,<your_database_url>,your_redis_url, etc.).src/runners/EnvBootstrap.ts): Updated the bootstrap flow to process.envcontents right after generation without overriding valid user-provided configuration or unrelated secrets (JWT_SECRET).Related Issue
Closes #32
Type of Change
Testing & Verification
.env.exampleconfigurations containing empty fields, placeholder tokens, and valid connection strings.