feat: hybrid single-file reports for heavy attachments - #798
Open
grootstebozewolf wants to merge 3 commits into
Open
feat: hybrid single-file reports for heavy attachments#798grootstebozewolf wants to merge 3 commits into
grootstebozewolf wants to merge 3 commits into
Conversation
Keep Awesome single-file HTML lean by externalizing attachments at or above 1 MiB under data/attachments/, with relative fetch fallback and CLI size warnings at 50/100 MiB. Sanitizes attachment contentType for data URLs and rejects absolute report data paths. Closes allure-framework#88
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses allure-framework/allure3#88: single-file reports with heavy attachments become slow / hard to open once the HTML grows into the 50–100MB range.
Approach (hybrid single-file)
HEAVY_ATTACHMENT_BYTES)index.html(portable single-file UX)data/attachments/instead of base64 in the HTMLwindow.allureReportData, fall back to a relative fetch (existing multi-file path)allure open/ HTTP overfile://)Security
contentTypebefore buildingdata:URLsReportFilesconfinementScope
@allurereport/core-api(formatByteSize, thresholds, warn helper)results packreusesformatByteSizeTest plan
yarn workspace @allurereport/core-api test test/utils/size.test.ts(9 passed)yarn workspace @allurereport/web-commons test test/data.test.ts(12 passed)yarn workspace @allurereport/plugin-awesome test(45 passed, 1 pre-existing todo)--single-filewith a multi-MB attachment; confirmindex.htmldoes not embed it and sibling file loads viaallure openFeedback wanted
singleFile: true, or should pure inline remain default with an opt-in?Closes #88