-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prettify provenance output #72
Conversation
d186b59
to
60b3c4a
Compare
} | ||
|
||
if (r.printed) { | ||
output += `PRINTED\n=======\n${r.printed}\n\n`; | ||
output += `PRINTED\n=======\n${r.printed}\n`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Bonus: There was an extra line added after printed lines because each ends with a new-line character. This cause three new lines instead of 2.
@@ -10,6 +10,7 @@ | |||
"typescript.tsc.autoDetect": "off", | |||
"cSpell.words": [ | |||
"eopa", | |||
"norc", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Author Note: ensure VS Code cspell does not complain about the name of the table style used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks
@@ -2,7 +2,7 @@ | |||
[![slack](https://img.shields.io/badge/slack-styra-24b6e0.svg?logo=slack)](https://styracommunity.slack.com/) | |||
[![Apache License](https://img.shields.io/badge/license-Apache%202.0-orange.svg)](https://www.apache.org/licenses/LICENSE-2.0) | |||
[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/Styra.vscode-styra?color=24b6e0)](#) | |||
[![Coverage](https://img.shields.io/badge/Coverage-74%25-brightgreen)](#) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing this happened automatically. Interesting setup.
What code changed, and why?
Provenance data had a bug when initially putting pretty output together, but with that fixed the data can now be processed and output in a more human-readable format.
Definition of done
When requesting previews with provenance data, the output is formatted for human consumption rather than dumped JSON.
How to test
You can install this version from source code
Install from source
npm install
.Exercise the Code
Set up an EOPA environment with preview enabled that uses bundles. Run a preview request to that environment ensuring the 'provenance' argument is set to true. Check the output to see the human-readable output.