Skip to content

Commit

Permalink
feat: Make it possible to only get create JWT as output
Browse files Browse the repository at this point in the history
Implements #33
  • Loading branch information
Göran Sander committed Jun 4, 2024
1 parent 983642f commit 873e5fa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion lib/create-qscloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,14 @@ const jwtCreateQscloud = async (options) => {
signingOptions
);
logger.info(`Created JWT:`);
logger.info(token);

// Should normal or minimal output be used?
if (options?.minimalOutput === true) {
// eslint-disable-next-line no-console
console.log(token);
} else {
logger.info(token);
}

return true;
} catch (err) {
Expand Down
9 changes: 8 additions & 1 deletion lib/create-qseow.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,14 @@ const jwtCreateQseow = async (options) => {
signingOptions
);
logger.info(`Created JWT:`);
logger.info(token);

// Should normal or minimal output be used?
if (options?.minimalOutput === true) {
// eslint-disable-next-line no-console
console.log(token);
} else {
logger.info(token);
}

return true;
} catch (err) {
Expand Down

0 comments on commit 873e5fa

Please sign in to comment.