MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / tarDirectory

Function tarDirectory

packages/aws-lambda/src/s3Transport.ts:113–119  ·  view source on GitHub ↗
(sourceDir: string, destTarball: string)

Source from the content-addressed store, hash-verified

111 * userland tools and does NOT include `tar` in `/usr/bin`.
112 */
113export async function tarDirectory(sourceDir: string, destTarball: string): Promise<void> {
114 if (!existsSync(sourceDir) || !statSync(sourceDir).isDirectory()) {
115 throw new Error(`[s3Transport] tar source must be an existing directory: ${sourceDir}`);
116 }
117 mkdirSync(dirname(destTarball), { recursive: true });
118 await tar.create({ gzip: true, file: destTarball, cwd: sourceDir }, ["."]);
119}
120
121/**
122 * Extract a `.tar.gz` produced by {@link tarDirectory} into `destDir`.

Callers 6

runLambdaLocalRenderFunction · 0.90
handlePlanFunction · 0.70
uploadChunkOutputFunction · 0.70
handleAssembleFunction · 0.70
deploySiteFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected