(compose: Record<string, any>)
| 44 | * @returns Promise resolving to hex-encoded hash |
| 45 | */ |
| 46 | export async function getComposeHash(compose: Record<string, any>): Promise<string> { |
| 47 | // Sort the object keys to ensure deterministic hashing |
| 48 | const sortedCompose = sortObjectKeys(compose); |
| 49 | |
| 50 | // Convert to JSON string with no extra whitespace |
| 51 | const jsonString = JSON.stringify(sortedCompose); |
| 52 | |
| 53 | // Return SHA-256 hash |
| 54 | return sha256Hash(jsonString); |
| 55 | } |
nothing calls this directly
no test coverage detected