Skip to content
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

Initial implementation #1

Merged
merged 39 commits into from
Jun 23, 2024
Merged

Initial implementation #1

merged 39 commits into from
Jun 23, 2024

Conversation

baltpeter
Copy link
Member

@baltpeter baltpeter commented Dec 7, 2023

This should be squashed.

@baltpeter baltpeter marked this pull request as ready for review May 13, 2024 08:12
@baltpeter baltpeter requested a review from zner0L May 13, 2024 08:12
We need to do the same thing in platform.
While I'm not the biggest fan of duplicating the code, we were also
(needlessly) inheriting the Node 18 restriction from CA. Also, CA is
pretty huge and I never liked depending on that just for this one type.

Since the type is expected to be pretty stable, I don't think vendoring
it is too much of an issue.
@baltpeter
Copy link
Member Author

Ugh, unfortunately, ReportHAR is currently not usable as a library. Trying to install it fails with:

error /home/benni/coding/JS/tweasel/platform/node_modules/reporthar: Command failed.
Exit code: 127
Command: patch-package
Arguments: 

I guess I shouldn't be surprised that patch-package doesn't really work for libraries, but I hadn't considered that.

Well, I guess we'll just have to create a nunjucks fork. Given how simple our patch is and how seldom nunjucks gets updated, that should be fine.

I was getting the following error when trying to use ReportHAR as a
library:

Module "trackhar/i18n/en.json" needs an import assertion of type "json"

But adding the assertion didn't help—Parcel strips those.
@zner0L zner0L merged commit a1e942f into main Jun 23, 2024
@zner0L zner0L deleted the b_initial-implementation branch June 23, 2024 17:17
baltpeter added a commit that referenced this pull request Jun 25, 2024
* Import har2pdf code

* har2pdf: Shift all headings down by one

* har2pdf: Make heading referencable

* First somewhat working prototype

* Description

* Only print requests referenced in the report

* Reference tracker-wiki in report

* Escaping

* Outsource style to external file

* Controller notices

* Complaints

* delete unused translations file

* Fixes #5: Render App Privacy Report/TrackerControl export

* Refactor GenerateOptions

* Mention app version in second analysis in complaint

* Complaint: Only include requests from user's network activity report

* Rename to ReportHAR

* Factor out traffic preparation

* Factor out Nunjucks code

* Factor out Typst compilation

* har2pdf: fix typo in encoding detection

* extract meta from tweasel HARs

* Allow passing harMd5

* Write docstrings

* write readme

* Fixes #4: Include software versions in report

* Add link to HAR tutorial

* Export prepareTraffic()

We need to do the same thing in platform.

* Vendor TweaselHar type

While I'm not the biggest fan of duplicating the code, we were also
(needlessly) inheriting the Node 18 restriction from CA. Also, CA is
pretty huge and I never liked depending on that just for this one type.

Since the type is expected to be pretty stable, I don't think vendoring
it is too much of an issue.

* Upgrade Parcel

Due to: parcel-bundler/parcel#9419

* Switch to our custom nunjucks fork

* Inline TrackHAR translations in bundle

I was getting the following error when trying to use ReportHAR as a
library:

Module "trackhar/i18n/en.json" needs an import assertion of type "json"

But adding the assertion didn't help—Parcel strips those.

* Export translations

* Support TrackerControl individual app exports

* Switch to released TrackHAR

* Template for informal complaints

* Actually convince Parcel to inline the translations and templates

Quite finicky…

* Remove yalc and update TrackHAR

* Add method section to report

---------

Co-authored-by: Lorenz Sieben <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants