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

Function runDestroy

packages/cli/src/commands/lambda/destroy.ts:22–42  ·  view source on GitHub ↗
(args: DestroyArgs)

Source from the content-addressed store, hash-verified

20}
21
22export async function runDestroy(args: DestroyArgs): Promise<void> {
23 const stack = requireStack(args.stackName);
24 console.log(c.dim(`→ sam delete (stack=${stack.stackName} region=${stack.region})`));
25 // Mirror deploy.ts's AWS_PROFILE env fallback — `AWS_PROFILE=prod
26 // hyperframes lambda destroy` should hit the same account `deploy`
27 // did, not the default credentials chain.
28 samDelete({
29 repoRoot: repoRoot(),
30 stackName: stack.stackName,
31 region: stack.region,
32 awsProfile: args.awsProfile ?? process.env.AWS_PROFILE,
33 });
34 deleteStackOutputs(args.stackName);
35 console.log();
36 console.log(c.success("Stack torn down."));
37 console.log(
38 c.dim(
39 `Note: the render bucket "${stack.bucketName}" was deployed with Retain — empty + delete it via the AWS console or CLI if you want to fully reclaim storage.`,
40 ),
41 );
42}

Callers

nothing calls this directly

Calls 4

requireStackFunction · 0.85
samDeleteFunction · 0.85
repoRootFunction · 0.85
deleteStackOutputsFunction · 0.85

Tested by

no test coverage detected