MCPcopy Create free account
hub / github.com/adobe/react-spectrum / artifactHash

Function artifactHash

perf/build.mjs:68–79  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

66}
67
68async function artifactHash(dir) {
69 let files = (await filesIn(dir)).filter(file => path.basename(file) !== 'manifest.json');
70 return hash(
71 Buffer.concat(
72 await Promise.all(
73 files.map(async file =>
74 Buffer.concat([Buffer.from(path.relative(dir, file)), await fs.readFile(file)])
75 )
76 )
77 )
78 );
79}
80
81export async function build(name) {
82 let dir = buildPath(name);

Callers 2

buildFunction · 0.85
loadBuildFunction · 0.85

Calls 3

filesInFunction · 0.85
hashFunction · 0.70
filterMethod · 0.65

Tested by

no test coverage detected