@architect/destroy
Advanced tools
Comparing version 1.0.2 to 1.0.3-RC.0
@@ -5,2 +5,11 @@ # Architect Sandbox changelog | ||
## [1.0.3] 2020-11-22 | ||
### Changed | ||
- Implemented Inventory (`@architect/inventory`) | ||
- Updated dependencies | ||
--- | ||
## [1.0.2] 2020-06-22 | ||
@@ -7,0 +16,0 @@ |
{ | ||
"name": "@architect/destroy", | ||
"version": "1.0.2", | ||
"version": "1.0.3-RC.0", | ||
"description": "Destroy projects created with Architect", | ||
@@ -12,4 +12,5 @@ "main": "src/index.js", | ||
"test": "npm run lint && npm run test:unit", | ||
"test:unit": "# TODO add some unit tests, please!", | ||
"test:integration": "tape test/integration/**/*-test.js | tap-spec" | ||
"test:unit": "cross-env echo TODO add some unit tests, please!", | ||
"test:integration": "cross-env tape test/integration/**/*-test.js | tap-spec", | ||
"rc": "npm version prerelease --preid RC" | ||
}, | ||
@@ -21,10 +22,12 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@architect/parser": "~2.1.5", | ||
"aws-sdk": "~2.644.0", | ||
"@architect/inventory": "~1.1.0-RC.14", | ||
"@architect/utils": "~2.0.0-RC.1", | ||
"aws-sdk": "2.712.0", | ||
"run-waterfall": "~1.1.6" | ||
}, | ||
"devDependencies": { | ||
"@architect/eslint-config": "0.0.1", | ||
"@architect/deploy": "^1.8.0", | ||
"eslint": "~7.3.0", | ||
"@architect/deploy": "^2.0.1", | ||
"@architect/eslint-config": "1.0.0", | ||
"cross-env": "~7.0.2", | ||
"eslint": "~7.11.0", | ||
"tap-spec": "^5.0.0", | ||
@@ -31,0 +34,0 @@ "tape": "^5.0.1" |
@@ -1,2 +0,2 @@ | ||
[<img src="https://s3-us-west-2.amazonaws.com/arc.codes/architect-logo-500b@2x.png" width=500>](https://www.npmjs.com/package/@architect/create) | ||
[<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) | ||
@@ -7,2 +7,5 @@ ## [`@architect/destroy`](https://www.npmjs.com/package/@architect/destroy) | ||
[![GitHub CI status](https://github.com/architect/destroy/workflows/Node%20CI/badge.svg)](https://github.com/architect/destroy/actions?query=workflow%3A%22Node+CI%22) | ||
Architect Destroy destroys Architect-generated projects. More specifically, it destroys your projects' CloudFormation stacks, and if called with `--force` (or the `force` param via API), destroys your DynamoDB (`@tables`) databases and S3 buckets and assets (`@static`). | ||
@@ -9,0 +12,0 @@ |
#!/usr/bin/env node | ||
let { read } = require('@architect/parser') | ||
let _inventory = require('@architect/inventory') | ||
let { banner, toLogicalID, updater } = require('@architect/utils') | ||
@@ -22,14 +22,15 @@ let { version } = require('../package.json') | ||
async function main (args) { | ||
let appname | ||
try { | ||
let inventory = await _inventory({}) | ||
appname = inventory.inv.app | ||
let { arc } = read() | ||
let findName = p => p === '--name' | ||
let named = args.includes('--name') && (args[args.findIndex(findName) + 1] === appname) | ||
let forces = p => [ '-f', '--force', 'force' ].includes(p) | ||
let force = args.some(forces) | ||
let production = args.includes('--production') | ||
let findName = p => p === '--name' | ||
let named = args.includes('--name') && (args[args.findIndex(findName) + 1] === arc.app[0]) | ||
let forces = p => [ '-f', '--force', 'force' ].includes(p) | ||
let force = args.some(forces) | ||
let production = args.includes('--production') | ||
try { | ||
if (require.main === module) { | ||
banner({ version: `Destroy ${version}` }) | ||
banner({ inventory, version: `Destroy ${version}` }) | ||
} | ||
@@ -44,3 +45,3 @@ if (!named) { | ||
} | ||
let name = toLogicalID(`${arc.app[0]}-${env}`) | ||
let name = toLogicalID(`${appname}-${env}`) | ||
await destroy({ name, force, update }) | ||
@@ -52,3 +53,3 @@ } | ||
if (message === 'no_name') { | ||
update.warn(`If you're really sure you want to destroy this app, run destroy with: --name ${arc.app[0]}`) | ||
update.warn(`If you're really sure you want to destroy this app, run destroy with: --name ${appname}`) | ||
} | ||
@@ -55,0 +56,0 @@ else if (message === 'bucket_exists') { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9366
229
22
4
6
2
1
+ Added@architect/utils@~2.0.0-RC.1
+ Added@architect/asap@3.13.8(transitive)
+ Added@architect/inventory@1.1.2(transitive)
+ Added@architect/parser@3.0.1(transitive)
+ Added@architect/utils@2.0.5(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedaws-sdk@2.712.0(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbuffer@4.9.2(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.1.7(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedonetime@5.1.2(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-sort@0.1.0(transitive)
+ Addedrestore-cursor@3.1.0(transitive)
+ Addedrun-series@1.1.9(transitive)
+ Addedsha@3.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removed@architect/parser@~2.1.5
- Removed@architect/parser@2.1.6(transitive)
- Removedaws-sdk@2.644.0(transitive)
- Removedbuffer@4.9.1(transitive)
Updatedaws-sdk@2.712.0