@dotcom-tool-kit/serverless 2.4.2 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tasks/teardown.d.ts.map +1 -1
- package/lib/tasks/teardown.js +10 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teardown.d.ts","sourceRoot":"","sources":["../../src/tasks/teardown.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAM/E,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IAC3E,MAAM,CAAC,WAAW,SAA2C;IAEvD,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"teardown.d.ts","sourceRoot":"","sources":["../../src/tasks/teardown.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAM/E,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IAC3E,MAAM,CAAC,WAAW,SAA2C;IAEvD,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwD3B"}
|
package/lib/tasks/teardown.js
CHANGED
|
@@ -9,7 +9,7 @@ const child_process_1 = require("child_process");
|
|
|
9
9
|
const options_1 = require("@dotcom-tool-kit/options");
|
|
10
10
|
class ServerlessTeardown extends types_1.Task {
|
|
11
11
|
async run() {
|
|
12
|
-
const { useVault, configPath, regions } = this.options;
|
|
12
|
+
const { useVault, configPath, regions, systemCode } = this.options;
|
|
13
13
|
const reviewState = (0, state_1.readState)('review');
|
|
14
14
|
if (!reviewState || !reviewState.stageName) {
|
|
15
15
|
throw new error_1.ToolKitError(`Could not find state for review, check that ${logger_1.styles.hook('deploy:review')} ran successfully`);
|
|
@@ -33,7 +33,15 @@ class ServerlessTeardown extends types_1.Task {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
this.logger.verbose('starting the child serverless process...');
|
|
36
|
-
const args = [
|
|
36
|
+
const args = [
|
|
37
|
+
'remove',
|
|
38
|
+
'--region',
|
|
39
|
+
regions[0],
|
|
40
|
+
'--stage',
|
|
41
|
+
reviewState.stageName,
|
|
42
|
+
'--aws-profile',
|
|
43
|
+
`CircleCI-role-${systemCode}`
|
|
44
|
+
];
|
|
37
45
|
if (configPath) {
|
|
38
46
|
args.push('--config', './serverless.yml');
|
|
39
47
|
}
|