MergePreservationRegions
@aurorajs.dev/catalyst-cli / generator/engine/lock-file / mergePreservationRegions
Function: mergePreservationRegions()
Sección titulada «Function: mergePreservationRegions()»mergePreservationRegions(
newContent,existingContent,priorHashes?):MergeResult
Defined in: generator/engine/lock-file.ts:225
Merge preservation regions: per-region decision based on priorHashes.
- If the existing body hash matches priorHashes[name] → use newContent body (user did not modify → template improvement propagates).
- Otherwise → preserve existingContent body byte-for-byte.
- If priorHashes is undefined → preserve all (fallback, legacy lockfile).
- Regions only in newContent keep their new body.
- Regions only in existingContent are dropped (body lost).
Parameters
Sección titulada «Parameters»newContent
Sección titulada «newContent»string
existingContent
Sección titulada «existingContent»string
priorHashes?
Sección titulada «priorHashes?»Record<string, string>