UNPKG
@alavida/agentpack
Version:
latest (0.2.3)
0.2.3
0.2.2
0.2.1
0.2.0
0.1.13
0.1.12
0.1.11
0.1.10
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
Compiler-driven lifecycle CLI for source-backed agent skills
docs.alavida.ai
alavida-ai/agentpack
@alavida/agentpack
/
src
/
domain
/
compiler
/
source-hash.js
8 lines
(6 loc)
•
235 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
import
{ createHash }
from
'node:crypto'
;
import
{ readFileSync }
from
'node:fs'
;
export
function
hashFile
(
filePath
) {
const
digest =
createHash
(
'sha256'
).
update
(
readFileSync
(filePath)).
digest
(
'hex'
);
return
`sha256:
${digest}
`
; }