Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit 4c90d7f

Browse files
authored
Script to render Spec Conformance Dashboard HTML (#24)
* html renderer wip * render html * add collapse functionality
1 parent 9f2ebf8 commit 4c90d7f

16 files changed

+1218
-12
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
dist/
22
node_modules/
33
coverage/
4+
__tests__/assets/
5+
lib/

.github/actions/specs-report/__tests__/assets/example-spec-conformance-table-web5-complex.html

Lines changed: 276 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
<!-- web5-spec CONFORMANCE TABLE: BEGIN -->
2+
<table role="grid" aria-label="web5-spec Conformance Table">
3+
<thead>
4+
<tr>
5+
<th scope="col">Specification</th>
6+
<th scope="col">web5-core-kt</th>
7+
<th scope="col">web5-rs</th>
8+
</tr>
9+
</thead>
10+
<tbody>
11+
<tr class="spec-row" data-spec-index="0">
12+
<!-- Specification Column -->
13+
<th scope="row">
14+
<button class="web5-spec-expand-collapse-btn spec-conformance-table-expand-collapse-btn" aria-expanded="false">+</button>
15+
<a href="https://github.com/TBD54566975/web5-spec/releases/tag/v0.3.1-alpha">v0.3.1-alpha</a>
16+
<a href="https://github.com/TBD54566975/web5-spec/tree/v0.3.1-alpha/test-vectors" aria-label="Test vectors for v0.3.1-alpha">(tests)</a>
17+
</th>
18+
19+
<!-- SDK Columns -->
20+
<td>
21+
<a href="https://github.com/TBD54566975/web5-rs/releases/tag/v4.0.0">v4.0.0</a>
22+
<span aria-label="Status: missing">&nbsp;🚧</span>
23+
</td>
24+
<td>
25+
<a href="https://github.com/TBD54566975/web5-rs/releases/tag/v4.0.0">v4.0.0</a>
26+
<span aria-label="Status: passed">&nbsp;✅</span>
27+
</td>
28+
</tr>
29+
<tr id="web5-spec-detail-row-0-Credentials-create" style="display: none;">
30+
<th>Credentials create</th>
31+
<td>-</td>
32+
<td>-</td>
33+
</tr>
34+
<tr id="web5-spec-detail-row-0-Credentials-verify" style="display: none;">
35+
<th>Credentials verify</th>
36+
<td>-</td>
37+
<td></td>
38+
</tr>
39+
<tr id="web5-spec-detail-row-0-CryptoEd25519-sign" style="display: none;">
40+
<th>CryptoEd25519 sign</th>
41+
<td></td>
42+
<td></td>
43+
</tr>
44+
<tr id="web5-spec-detail-row-0-CryptoEd25519-verify" style="display: none;">
45+
<th>CryptoEd25519 verify</th>
46+
<td></td>
47+
<td></td>
48+
</tr>
49+
<tr id="web5-spec-detail-row-0-CryptoEs256k-sign" style="display: none;">
50+
<th>CryptoEs256k sign</th>
51+
<td>-</td>
52+
<td>-</td>
53+
</tr>
54+
<tr id="web5-spec-detail-row-0-CryptoEs256k-verify" style="display: none;">
55+
<th>CryptoEs256k verify</th>
56+
<td>-</td>
57+
<td>-</td>
58+
</tr>
59+
<tr id="web5-spec-detail-row-0-DidDht-create" style="display: none;">
60+
<th>DidDht create</th>
61+
<td>-</td>
62+
<td>-</td>
63+
</tr>
64+
<tr id="web5-spec-detail-row-0-DidDht-resolve" style="display: none;">
65+
<th>DidDht resolve</th>
66+
<td>-</td>
67+
<td></td>
68+
</tr>
69+
<tr id="web5-spec-detail-row-0-DidJwk-resolve" style="display: none;">
70+
<th>DidJwk resolve</th>
71+
<td></td>
72+
<td></td>
73+
</tr>
74+
<tr id="web5-spec-detail-row-0-DidWeb-resolve" style="display: none;">
75+
<th>DidWeb resolve</th>
76+
<td>-</td>
77+
<td>-</td>
78+
</tr>
79+
<tr id="web5-spec-detail-row-0-PortableDid-parse" style="display: none;">
80+
<th>PortableDid parse</th>
81+
<td>-</td>
82+
<td>-</td>
83+
</tr>
84+
<tr id="web5-spec-detail-row-0-PresentationExchange-create_presentation_from_credentials" style="display: none;">
85+
<th>PresentationExchange create_presentation_from_credentials</th>
86+
<td>-</td>
87+
<td>-</td>
88+
</tr>
89+
<tr id="web5-spec-detail-row-0-PresentationExchange-evaluate_presentation" style="display: none;">
90+
<th>PresentationExchange evaluate_presentation</th>
91+
<td>-</td>
92+
<td>-</td>
93+
</tr>
94+
<tr id="web5-spec-detail-row-0-PresentationExchange-select_credentials" style="display: none;">
95+
<th>PresentationExchange select_credentials</th>
96+
<td>-</td>
97+
<td>-</td>
98+
</tr>
99+
<tr id="web5-spec-detail-row-0-PresentationExchange-validate_definition" style="display: none;">
100+
<th>PresentationExchange validate_definition</th>
101+
<td>-</td>
102+
<td>-</td>
103+
</tr>
104+
<tr id="web5-spec-detail-row-0-PresentationExchange-validate_submission" style="display: none;">
105+
<th>PresentationExchange validate_submission</th>
106+
<td>-</td>
107+
<td>-</td>
108+
</tr>
109+
<tr id="web5-spec-detail-row-0-VcJwt-decode" style="display: none;">
110+
<th>VcJwt decode</th>
111+
<td>-</td>
112+
<td>-</td>
113+
</tr>
114+
<tr id="web5-spec-detail-row-0-VcJwt-verify" style="display: none;">
115+
<th>VcJwt verify</th>
116+
<td>-</td>
117+
<td>-</td>
118+
</tr>
119+
</tbody>
120+
</table>
121+
122+
<script>
123+
document.querySelectorAll('.web5-spec-expand-collapse-btn').forEach(button => {
124+
button.addEventListener('click', function() {
125+
const specRow = this.closest('.spec-row');
126+
127+
const detailRows = document.querySelectorAll(`[id^="web5-spec-detail-row-${specRow.dataset.specIndex}"]`);
128+
129+
const isExpanded = this.getAttribute('aria-expanded') === 'true';
130+
131+
if (isExpanded) {
132+
this.setAttribute('aria-expanded', 'false');
133+
this.textContent = '+';
134+
detailRows.forEach(row => row.style.display = 'none');
135+
} else {
136+
this.setAttribute('aria-expanded', 'true');
137+
this.textContent = '-';
138+
detailRows.forEach(row => row.style.display = 'table-row');
139+
}
140+
});
141+
});
142+
</script>
143+
<!-- web5-spec CONFORMANCE TABLE: END -->
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
{
2+
"specReleases": [
3+
{
4+
"version": "v0.4-alpha",
5+
"releaseLink": "https://github.com/TBD54566975/web5-spec/releases/tag/v0.4-alpha",
6+
"testVectors": {
7+
"srcLink": "https://github.com/TBD54566975/web5-spec/tree/v0.4-alpha/test-vectors",
8+
"cases": {
9+
"Credentials": [
10+
"create",
11+
"verify"
12+
],
13+
"CryptoEd25519": [
14+
"sign",
15+
"verify"
16+
],
17+
"CryptoEs256k": [
18+
"sign",
19+
"verify"
20+
],
21+
"DidDht": [
22+
"create",
23+
"resolve"
24+
],
25+
"DidJwk": [
26+
"resolve"
27+
],
28+
"DidWeb": [
29+
"resolve"
30+
],
31+
"PortableDid": [
32+
"parse"
33+
],
34+
"PresentationExchange": [
35+
"create_presentation_from_credentials",
36+
"evaluate_presentation",
37+
"select_credentials",
38+
"validate_definition",
39+
"validate_submission"
40+
],
41+
"VcJwt": [
42+
"decode",
43+
"verify"
44+
]
45+
}
46+
},
47+
"sdks": {
48+
"web5-rs": {
49+
"version": "v4.0.0",
50+
"releaseLink": "https://github.com/TBD54566975/web5-rs/releases/tag/v4.0.0",
51+
"status": "missing",
52+
"casesReport": {
53+
"CryptoEd25519": {
54+
"sign": {
55+
"status": "passed"
56+
},
57+
"verify": {
58+
"status": "passed"
59+
}
60+
},
61+
"Credentials": {
62+
"verify": {
63+
"status": "passed"
64+
}
65+
},
66+
"DidDht": {
67+
"resolve": {
68+
"status": "passed"
69+
}
70+
},
71+
"DidJwk": {
72+
"resolve": {
73+
"status": "passed"
74+
}
75+
}
76+
}
77+
},
78+
"web5-core-kt": {
79+
"version": "v4.0.0",
80+
"releaseLink": "https://github.com/TBD54566975/web5-rs/releases/tag/v4.0.0",
81+
"status": "missing",
82+
"casesReport": {
83+
"CryptoEd25519": {
84+
"verify": {
85+
"status": "passed"
86+
},
87+
"sign": {
88+
"status": "passed"
89+
}
90+
},
91+
"DidJwk": {
92+
"resolve": {
93+
"status": "passed"
94+
}
95+
}
96+
}
97+
}
98+
}
99+
},
100+
{
101+
"version": "v0.3",
102+
"releaseLink": "https://github.com/TBD54566975/web5-spec/releases/tag/v0.3",
103+
"testVectors": {
104+
"srcLink": "https://github.com/TBD54566975/web5-spec/tree/v0.3/test-vectors",
105+
"cases": {
106+
"Credentials": [
107+
"create",
108+
"verify"
109+
],
110+
"CryptoEd25519": [
111+
"sign",
112+
"verify"
113+
],
114+
"CryptoEs256k": [
115+
"sign",
116+
"verify"
117+
],
118+
"DidDht": [
119+
"create",
120+
"resolve"
121+
],
122+
"DidJwk": [
123+
"resolve"
124+
],
125+
"DidWeb": [
126+
"resolve"
127+
]
128+
}
129+
},
130+
"sdks": {
131+
"web5-core-kt": {
132+
"version": "v3.1.2",
133+
"releaseLink": "https://github.com/TBD54566975/web5-rs/releases/tag/v3.1.2",
134+
"status": "failed",
135+
"casesReport": {
136+
"CryptoEd25519": {
137+
"verify": {
138+
"status": "failed"
139+
},
140+
"sign": {
141+
"status": "passed"
142+
}
143+
},
144+
"DidJwk": {
145+
"resolve": {
146+
"status": "passed"
147+
}
148+
}
149+
}
150+
},
151+
"web5-kt": {
152+
"version": "v2.9.113",
153+
"releaseLink": "https://github.com/TBD54566975/web5-rs/releases/tag/v2.9.113",
154+
"status": "passed",
155+
"casesReport": {
156+
"CryptoEd25519": {
157+
"verify": {
158+
"status": "passed"
159+
},
160+
"sign": {
161+
"status": "passed"
162+
}
163+
},
164+
"DidJwk": {
165+
"resolve": {
166+
"status": "passed"
167+
}
168+
},
169+
"DidWeb": {
170+
"resolve": {
171+
"status": "passed"
172+
}
173+
}
174+
}
175+
}
176+
}
177+
},
178+
{
179+
"version": "v0.2",
180+
"releaseLink": "https://github.com/TBD54566975/web5-spec/releases/tag/v0.2",
181+
"testVectors": {
182+
"srcLink": "https://github.com/TBD54566975/web5-spec/tree/v0.2/test-vectors",
183+
"cases": {
184+
"Credentials": [
185+
"create",
186+
"verify"
187+
],
188+
"DidWeb": [
189+
"resolve"
190+
]
191+
}
192+
},
193+
"sdks": {
194+
"web5-kt": {
195+
"version": "v2.0.1",
196+
"releaseLink": "https://github.com/TBD54566975/web5-rs/releases/tag/v2.0.1",
197+
"status": "passed",
198+
"casesReport": {
199+
"Credentials": {
200+
"create": {
201+
"status": "passed"
202+
},
203+
"verify": {
204+
"status": "passed"
205+
}
206+
},
207+
"DidWeb": {
208+
"resolve": {
209+
"status": "passed"
210+
}
211+
}
212+
}
213+
}
214+
}
215+
}
216+
]
217+
}

0 commit comments

Comments
 (0)