Skip to main content

Function: applyPreHashCleanup()

applyPreHashCleanup(content, cleanups): string

Defined in: packages/core/src/domain/services/pre-hash-cleanup.ts:16

Applies pre-hash cleanup substitutions to artifact content.

Pre-hash cleanup rules are regex-based substitutions defined in the schema. They strip variable content (timestamps, whitespace, etc.) from artifact content before computing a hash, ensuring that formatting changes that don't affect substance don't invalidate the hash.

Parameters

content

string

The raw artifact content

cleanups

readonly PreHashCleanup[]

Pre-hash cleanup rules from the schema

Returns

string

The cleaned content with all substitutions applied