Writes a rendered .env.example to location. Behavior when a file
already exists there is governed by options.onExisting (default
"keep-sibling", see EnvExampleOnExisting):
"keep-sibling": the existing file is left alone; freshly generated
content is written to a timestamped sibling instead
(<location>.<epoch-ms>), prefixed with a reconciliation header
comparing it against the existing file (omitted when there's nothing
to report).
"overwrite": the existing file is replaced directly with freshly
rendered content -- no reconciliation header (the changes it would
describe are already applied).
"skip": nothing is written.
When no file exists yet at location, all three modes behave the same:
write fresh content, nothing to reconcile against. staleVariables/
variablesToComment/variablesToAdd are always computed and returned
when a prior file existed, even under "overwrite"/"skip", as a
diagnostic -- independent of whether anything was actually written.
Writes a rendered
.env.exampletolocation. Behavior when a file already exists there is governed byoptions.onExisting(default"keep-sibling", seeEnvExampleOnExisting):"keep-sibling": the existing file is left alone; freshly generated content is written to a timestamped sibling instead (<location>.<epoch-ms>), prefixed with a reconciliation header comparing it against the existing file (omitted when there's nothing to report)."overwrite": the existing file is replaced directly with freshly rendered content -- no reconciliation header (the changes it would describe are already applied)."skip": nothing is written. When no file exists yet atlocation, all three modes behave the same: write fresh content, nothing to reconcile against.staleVariables/variablesToComment/variablesToAddare always computed and returned when a prior file existed, even under"overwrite"/"skip", as a diagnostic -- independent of whether anything was actually written.