-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(WIP) Adding Header Validation tool and github workflow
- Loading branch information
1 parent
1f47f11
commit 9585d9a
Showing
15 changed files
with
3,919 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'Makefile' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'Makefile' | ||
- 'header-validation/**' | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build | ||
run: make | ||
- name: Deploy | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./out |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
SHELL = /bin/bash | ||
OUT_DIR ?= out | ||
|
||
.PHONY: all clean validator | ||
all: validator | ||
|
||
validator: $(OUT_DIR)/validate-headers.html $(OUT_DIR)/validate-headers.js | ||
|
||
$(OUT_DIR)/validate-headers.html: header-validation/index.html $(OUT_DIR) | ||
@ cp $< $@ | ||
|
||
$(OUT_DIR)/validate-headers.js: header-validation/dist/main.js $(OUT_DIR) | ||
@ cp $< $@ | ||
|
||
$(OUT_DIR): | ||
@ mkdir -p $@ | ||
|
||
header-validation/dist/main.js: header-validation/package.json header-validation/src/*.js | ||
@ npm ci --prefix ./header-validation | ||
@ npm run build --prefix ./header-validation | ||
|
||
clean: | ||
@ rm -rf $(OUT_DIR) | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
node_modules |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> | ||
<meta charset=utf-8> | ||
<title>Attribution Reporting Header Validation</title> | ||
|
||
<!--Load Webpage Style--> | ||
<link rel="stylesheet" href="style.css"> | ||
|
||
<body> | ||
<!--Title--> | ||
<h1>Attribution Reporting Header Validation</h1> | ||
<form id=validation-form> | ||
<noscript>JavaScript is required to use this form.</noscript> | ||
<!--Input Box--> | ||
<fieldset id=input> | ||
<legend>Value</legend> | ||
<textarea id=input-text></textarea> | ||
</fieldset> | ||
<!--Input Options/Output Results--> | ||
<div id=right> | ||
<!--Input Options--> | ||
<fieldset id=header-options> | ||
<legend>Header</legend> | ||
<!--Header Type--> | ||
<p><label><input type=radio name=header value=trigger checked><code>Attribution-Reporting-Register-Trigger</code></label> | ||
<p><label><input type=radio name=header value=source><code>Attribution-Reporting-Register-Source</code></label> | ||
<!--Source Type (only applicable to header type: Attribution-Reporting-Register-Source)--> | ||
<fieldset id=source-type-options> | ||
<legend>Source Type</legend> | ||
<p><label><input type=radio name=source-type value=event checked>event</label> | ||
<p><label><input type=radio name=source-type value=navigation>navigation</label> | ||
</fieldset> | ||
<!-- Registration Type --> | ||
<fieldset id=registration-type-options> | ||
<legend>Registration Type</legend> | ||
<p><label><input type=radio name=registration-type value=app checked>app</label> | ||
<p><label><input type=radio name=registration-type value=web>web</label> | ||
</fieldset> | ||
<!--Additional Feature Selection--> | ||
<p><label><input type=checkbox name=feature-ara-parsing-alignment-v1>Measurement Enable ARA Parsing Alignment V1</label> | ||
<p><label><input type=checkbox name=feature-lookback-window-filter>Measurement Enable Lookback Window Filter</label> | ||
<p><label><input type=checkbox name=feature-trigger-data-matching>Measurement Enable Trigger Data Matching</label> | ||
</fieldset> | ||
|
||
<!--Output Results--> | ||
<fieldset id=output> | ||
<legend>Validation Result</legend> | ||
<!--Output Options--> | ||
<button type=button id=linkify>Copy Link</button> | ||
<!--Output Text--> | ||
<output> | ||
<div id=success></div> | ||
<p>Errors: | ||
<ul id=errors></ul> | ||
<p>Warnings: | ||
<ul id=warnings></ul> | ||
<p>Notes: | ||
<ul id=notes></ul> | ||
</output> | ||
</fieldset> | ||
</div> | ||
</form> | ||
|
||
<!--Load Webpage Script--> | ||
<script src="./dist/main.js"></script> | ||
</body> |
Oops, something went wrong.