File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { AsyncLocalStorage } from "node:async_hooks" ;
2- import { createHash } from "node:crypto" ;
32import { existsSync , promises as fs } from "node:fs" ;
43import { basename , dirname , join } from "node:path" ;
54import { ACCOUNT_LIMITS } from "./constants.js" ;
@@ -23,6 +22,7 @@ import {
2322import { isCacheLikeBackupArtifactName } from "./storage/cache-artifacts.js" ;
2423import { formatStorageErrorHint } from "./storage/error-hints.js" ;
2524import { loadFlaggedAccountsFromFile } from "./storage/flagged-storage-file.js" ;
25+ import { computeSha256 } from "./storage/hash.js" ;
2626import {
2727 collectNamedBackups ,
2828 type NamedBackupSummary ,
@@ -472,10 +472,6 @@ async function cleanupStaleRotatingBackupArtifacts(
472472 }
473473}
474474
475- function computeSha256 ( value : string ) : string {
476- return createHash ( "sha256" ) . update ( value ) . digest ( "hex" ) ;
477- }
478-
479475function createEmptyStorageWithMetadata (
480476 restoreEligible : boolean ,
481477 restoreReason : RestoreReason ,
Original file line number Diff line number Diff line change 1+ import { createHash } from "node:crypto" ;
2+
3+ export function computeSha256 ( value : string ) : string {
4+ return createHash ( "sha256" ) . update ( value ) . digest ( "hex" ) ;
5+ }
You can’t perform that action at this time.
0 commit comments