MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / getComposeHash

Function getComposeHash

sdk/js/src/get-compose-hash.ts:102–108  ·  view source on GitHub ↗
(app_compose: AppCompose, normalize: boolean = false)

Source from the content-addressed store, hash-verified

100}
101
102export function getComposeHash(app_compose: AppCompose, normalize: boolean = false): string {
103 if (normalize) {
104 app_compose = preprocessAppCompose(app_compose);
105 }
106 const manifest_str = toDeterministicJson(app_compose);
107 return crypto.createHash("sha256").update(manifest_str, "utf8").digest("hex");
108}

Callers 2

mainFunction · 0.50

Calls 3

toDeterministicJsonFunction · 0.85
preprocessAppComposeFunction · 0.70
digestMethod · 0.45

Tested by

no test coverage detected