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

Function tarballBuffer

scripts/verdaccio-seed.js:30–39  ·  view source on GitHub ↗
(dir, files)

Source from the content-addressed store, hash-verified

28}
29
30function tarballBuffer(dir, files) {
31 return new Promise((resolve, reject) => {
32 const chunks = [];
33 tar
34 .create({cwd: dir, gzip: true, portable: true, prefix: 'package/'}, files)
35 .on('data', c => chunks.push(c))
36 .on('end', () => resolve(Buffer.concat(chunks)))
37 .on('error', reject);
38 });
39}
40
41async function seedOne(storagePath, location) {
42 const dir = path.resolve(process.cwd(), location);

Callers 1

seedOneFunction · 0.85

Calls 2

pushMethod · 0.80
resolveFunction · 0.50

Tested by

no test coverage detected