@devramps/cli 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -279,6 +279,10 @@ async function previewStackChanges(options) {
279
279
  const templateBody = JSON.stringify(template);
280
280
  const stackStatus = await getStackStatus(stackName, credentials, region);
281
281
  const changeSetName = `devramps-preview-${Date.now()}`;
282
+ if (!stackStatus.exists) {
283
+ info(` Stack ${stackName} will be created (new stack)`);
284
+ return;
285
+ }
282
286
  try {
283
287
  await client.send(
284
288
  new CreateChangeSetCommand({
@@ -286,7 +290,7 @@ async function previewStackChanges(options) {
286
290
  ChangeSetName: changeSetName,
287
291
  TemplateBody: templateBody,
288
292
  Capabilities: ["CAPABILITY_NAMED_IAM"],
289
- ChangeSetType: stackStatus.exists ? ChangeSetType.UPDATE : ChangeSetType.CREATE
293
+ ChangeSetType: ChangeSetType.UPDATE
290
294
  })
291
295
  );
292
296
  await waitUntilChangeSetCreateComplete(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devramps/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "DevRamps CLI - Bootstrap AWS infrastructure for CI/CD pipelines",
5
5
  "main": "dist/index.js",
6
6
  "bin": {