Skip to content

Commit

Permalink
fix: improve messaging when no SSM updates are performed
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdFire87 committed Apr 3, 2020
1 parent 764cfbf commit 0bb5a6b
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,21 @@ class ServerlessSSMPublish {
Value: typeof param.value === 'string' ? param.value : yaml.safeDump(param.value),
Overwrite: true,
Type: param.secure ? 'SecureString' : 'String',
},
).promise(),
));
}).promise(),
));
this.logIfDebug(`SSM Put Results:\n${chalk.green(
markdownTable([
['Path', 'Secure', 'Version', 'Tier'],
...putResults.map(({ Version, Tier }, i) =>
([
toUpdate[i].path,
toUpdate[i].secure,
Version ? Version : '',
Tier ? Tier : '',
]) as string[]),
]),
putResults.length > 0
? (markdownTable([
['Path', 'Secure', 'Version', 'Tier'],
...putResults.map(({ Version, Tier }, i) =>
([
toUpdate[i].path,
toUpdate[i].secure,
Version ? Version : '',
Tier ? Tier : '',
]) as string[]),
]))
: 'No updates performed.',
)}`);
}

Expand Down

0 comments on commit 0bb5a6b

Please sign in to comment.