Skip to content

Commit b18434e

Browse files
authored
fix(server): repair cutover test crypto import breaking main CI (#31630)
1 parent e66c316 commit b18434e

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎apps/server/src/orchestration-v2/legacy/LegacyV1Cutover.integration.test.ts‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ import {
1515
type OrchestrationV2ThreadProjection,
1616
} from "@t3tools/contracts";
1717
import * as NodeSqliteClient from "@t3tools/shared/nodeSqliteClient";
18-
import * as Crypto from "effect/Crypto";
18+
import * as Digest from "effect/crypto/Digest";
1919
import * as DateTime from "effect/DateTime";
2020
import * as Effect from "effect/Effect";
21-
import * as Hex from "effect/encoding/Hex";
2221
import * as FileSystem from "effect/FileSystem";
2322
import * as Layer from "effect/Layer";
2423
import * as Logger from "effect/Logger";
@@ -705,11 +704,9 @@ const makeCapturingLogger = (logs: CapturedLog[]) =>
705704

706705
const sha256File = Effect.fn("LegacyV1Cutover.sha256File")(function* (filePath: string) {
707706
const fs = yield* FileSystem.FileSystem;
708-
const crypto = yield* Crypto.Crypto;
709-
return Hex.encode(
710-
yield* crypto.digest("SHA-256", yield* fs.readFile(filePath)).pipe(Effect.orDie),
711-
);
712-
}, Effect.provide(NodeCrypto.layer));
707+
const digest = yield* Digest.Digest;
708+
return yield* digest.digestHex(Digest.sha256, yield* fs.readFile(filePath));
709+
}, Effect.provide(NodeCrypto.layerDigest));
713710

714711
interface LegacyTableSnapshot {
715712
readonly columns: ReadonlyArray<string>;

0 commit comments

Comments
 (0)