(args: DestroyArgs)
| 20 | } |
| 21 | |
| 22 | export 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 | } |
nothing calls this directly
no test coverage detected