Skip to content

Commit

Permalink
Merge pull request #32 from mysense-ai/bugfix/table-formatting
Browse files Browse the repository at this point in the history
Bugfix/table formatting
  • Loading branch information
ColdFire87 authored Apr 3, 2020
2 parents 737e9db + 0bb5a6b commit 71c17da
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 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(),
));
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[]),
]),
}).promise(),
));
this.logIfDebug(`SSM Put Results:\n${chalk.green(
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 Expand Up @@ -281,7 +282,7 @@ class ServerlessSSMPublish {
}

private summary() {
this.log(`SSM Publish Summary:\n ${chalk.bold.green(
this.log(`SSM Publish Summary:\n${chalk.bold.green(
markdownTable([
[
`Created (${this.nonExistingParams.length})`,
Expand Down

0 comments on commit 71c17da

Please sign in to comment.