Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@architect/destroy

Package Overview
Dependencies
Maintainers
6
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@architect/destroy - npm Package Compare versions

Comparing version 1.2.6 to 1.3.0

12

changelog.md

@@ -13,2 +13,14 @@ # Architect Destroy changelog

## [1.3.0] 2021-06-22
### Added
- Added a `--no-timeout` flag, which causes `destroy` to wait until the CloudFormation Stack is deleted before exiting
### Changed
- `destroy` now pings the CloudFormation API to check for Stack deletion every 10 seconds (instead of increasingly backing off starting from 10 seconds to 60 seconds)
---
## [1.2.4] 2021-06-09

@@ -15,0 +27,0 @@

2

package.json
{
"name": "@architect/destroy",
"version": "1.2.6",
"version": "1.3.0",
"description": "Destroy projects created with Architect",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -9,9 +9,7 @@ [<img src="https://s3-us-west-2.amazonaws.com/arc.codes/architect-logo-500b@2x.png" width=500>](https://www.npmjs.com/package/@architect/destroy)

Architect Destroy destroys Architect-generated projects. More specifically, it destroys your projects' CloudFormation Stacks, CloudWatch Log Groups, S3 bucket used during deployment, SSM Parameters added by [`arc env`](https://github.com/architect/env), and if called with `--force` (or the `force` param via API), destroys your DynamoDB (`@tables`) databases and S3 bucket housing your static assets (`@static`).
## API
### `destroy({ appname, stackname, env, force, now }, callback)`
### `destroy({ appname, stackname, env, force, now, retries }, callback)`

@@ -25,1 +23,5 @@ Destroys all infrastructure associated to your Architect app.

- `now`: (boolean) immeditely destroy the app (instead of waiting the requisite 5 seconds)
- `retries`: while waiting for a CloudFormation Stack to be destroyed, how many
times do we ping the CloudFormation API checking if the Stack has been
removed? This API is pinged every 10 seconds. If `retries` is exhausted,
`callback` will be invoked with an error.

@@ -48,2 +48,3 @@ #!/usr/bin/env node

let production = args.includes('--production')
let retries = args.includes('--no-timeout') ? 999 : 15 // how many times do we ping the CloudFormation API to check if the stack is deleted?

@@ -60,3 +61,3 @@ let now = args.includes('--now')

}
await destroy({ appname, stackname, env, force, now, update })
await destroy({ appname, stackname, env, force, now, retries, update })
}

@@ -63,0 +64,0 @@ catch (err) {

@@ -21,3 +21,3 @@ let aws = require('aws-sdk')

module.exports = function destroy (params, callback) {
let { appname, stackname, env, force = false, now, update } = params
let { appname, stackname, env, force = false, now, retries, update } = params
if (!update) update = updater('Destroy')

@@ -182,3 +182,3 @@

let tries = 1
let max = 6
let max = retries // typical values are 15 or 999; see cli.js
function checkit () {

@@ -201,3 +201,3 @@ cloudformation.describeStacks({

if (tries === max) {
callback(Error('Destroy failed; hit max retries'))
callback(Error(`CloudFormation Stack destroy still ongoing; aborting as we hit max number of retries (${max})`))
}

@@ -208,3 +208,3 @@ else {

}
}, 10000 * tries)
}, 10000)
})

@@ -211,0 +211,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc