@setsquare/review-sdk 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +57 -0
  3. package/README.md +338 -0
  4. package/THIRD-PARTY-NOTICES.md +61 -0
  5. package/dist/autoscan.d.ts +25 -0
  6. package/dist/autoscan.d.ts.map +1 -0
  7. package/dist/autoscan.js +332 -0
  8. package/dist/autoscan.js.map +1 -0
  9. package/dist/axe.d.ts +96 -0
  10. package/dist/axe.d.ts.map +1 -0
  11. package/dist/axe.js +210 -0
  12. package/dist/axe.js.map +1 -0
  13. package/dist/bin/setsquare.d.ts +3 -0
  14. package/dist/bin/setsquare.d.ts.map +1 -0
  15. package/dist/bin/setsquare.js +21 -0
  16. package/dist/bin/setsquare.js.map +1 -0
  17. package/dist/brand.d.ts +84 -0
  18. package/dist/brand.d.ts.map +1 -0
  19. package/dist/brand.js +335 -0
  20. package/dist/brand.js.map +1 -0
  21. package/dist/checks/dynamic.d.ts +57 -0
  22. package/dist/checks/dynamic.d.ts.map +1 -0
  23. package/dist/checks/dynamic.js +184 -0
  24. package/dist/checks/dynamic.js.map +1 -0
  25. package/dist/checks/rule-pack.d.ts +34 -0
  26. package/dist/checks/rule-pack.d.ts.map +1 -0
  27. package/dist/checks/rule-pack.js +270 -0
  28. package/dist/checks/rule-pack.js.map +1 -0
  29. package/dist/checks/versions.d.ts +28 -0
  30. package/dist/checks/versions.d.ts.map +1 -0
  31. package/dist/checks/versions.js +45 -0
  32. package/dist/checks/versions.js.map +1 -0
  33. package/dist/ci.d.ts +37 -0
  34. package/dist/ci.d.ts.map +1 -0
  35. package/dist/ci.js +199 -0
  36. package/dist/ci.js.map +1 -0
  37. package/dist/contract.d.ts +334 -0
  38. package/dist/contract.d.ts.map +1 -0
  39. package/dist/contract.js +35 -0
  40. package/dist/contract.js.map +1 -0
  41. package/dist/dedupe.d.ts +79 -0
  42. package/dist/dedupe.d.ts.map +1 -0
  43. package/dist/dedupe.js +102 -0
  44. package/dist/dedupe.js.map +1 -0
  45. package/dist/document.d.ts +29 -0
  46. package/dist/document.d.ts.map +1 -0
  47. package/dist/document.js +94 -0
  48. package/dist/document.js.map +1 -0
  49. package/dist/envelope.d.ts +124 -0
  50. package/dist/envelope.d.ts.map +1 -0
  51. package/dist/envelope.js +337 -0
  52. package/dist/envelope.js.map +1 -0
  53. package/dist/escape.d.ts +14 -0
  54. package/dist/escape.d.ts.map +1 -0
  55. package/dist/escape.js +20 -0
  56. package/dist/escape.js.map +1 -0
  57. package/dist/findings.d.ts +47 -0
  58. package/dist/findings.d.ts.map +1 -0
  59. package/dist/findings.js +229 -0
  60. package/dist/findings.js.map +1 -0
  61. package/dist/fixture.d.ts +7 -0
  62. package/dist/fixture.d.ts.map +1 -0
  63. package/dist/fixture.js +237 -0
  64. package/dist/fixture.js.map +1 -0
  65. package/dist/group.d.ts +214 -0
  66. package/dist/group.d.ts.map +1 -0
  67. package/dist/group.js +709 -0
  68. package/dist/group.js.map +1 -0
  69. package/dist/html-report.d.ts +68 -0
  70. package/dist/html-report.d.ts.map +1 -0
  71. package/dist/html-report.js +649 -0
  72. package/dist/html-report.js.map +1 -0
  73. package/dist/human.d.ts +65 -0
  74. package/dist/human.d.ts.map +1 -0
  75. package/dist/human.js +111 -0
  76. package/dist/human.js.map +1 -0
  77. package/dist/index.d.ts +34 -0
  78. package/dist/index.d.ts.map +1 -0
  79. package/dist/index.js +33 -0
  80. package/dist/index.js.map +1 -0
  81. package/dist/infer.d.ts +65 -0
  82. package/dist/infer.d.ts.map +1 -0
  83. package/dist/infer.js +67 -0
  84. package/dist/infer.js.map +1 -0
  85. package/dist/insights.d.ts +140 -0
  86. package/dist/insights.d.ts.map +1 -0
  87. package/dist/insights.js +483 -0
  88. package/dist/insights.js.map +1 -0
  89. package/dist/install.d.ts +8 -0
  90. package/dist/install.d.ts.map +1 -0
  91. package/dist/install.js +114 -0
  92. package/dist/install.js.map +1 -0
  93. package/dist/links.d.ts +45 -0
  94. package/dist/links.d.ts.map +1 -0
  95. package/dist/links.js +45 -0
  96. package/dist/links.js.map +1 -0
  97. package/dist/mask.d.ts +85 -0
  98. package/dist/mask.d.ts.map +1 -0
  99. package/dist/mask.js +98 -0
  100. package/dist/mask.js.map +1 -0
  101. package/dist/observe.d.ts +51 -0
  102. package/dist/observe.d.ts.map +1 -0
  103. package/dist/observe.js +233 -0
  104. package/dist/observe.js.map +1 -0
  105. package/dist/options.d.ts +249 -0
  106. package/dist/options.d.ts.map +1 -0
  107. package/dist/options.js +185 -0
  108. package/dist/options.js.map +1 -0
  109. package/dist/output.d.ts +113 -0
  110. package/dist/output.d.ts.map +1 -0
  111. package/dist/output.js +231 -0
  112. package/dist/output.js.map +1 -0
  113. package/dist/perf.d.ts +11 -0
  114. package/dist/perf.d.ts.map +1 -0
  115. package/dist/perf.js +150 -0
  116. package/dist/perf.js.map +1 -0
  117. package/dist/reading-level.d.ts +73 -0
  118. package/dist/reading-level.d.ts.map +1 -0
  119. package/dist/reading-level.js +189 -0
  120. package/dist/reading-level.js.map +1 -0
  121. package/dist/reporter.d.ts +94 -0
  122. package/dist/reporter.d.ts.map +1 -0
  123. package/dist/reporter.js +709 -0
  124. package/dist/reporter.js.map +1 -0
  125. package/dist/rules.d.ts +55 -0
  126. package/dist/rules.d.ts.map +1 -0
  127. package/dist/rules.js +77 -0
  128. package/dist/rules.js.map +1 -0
  129. package/dist/runtime.d.ts +32 -0
  130. package/dist/runtime.d.ts.map +1 -0
  131. package/dist/runtime.js +67 -0
  132. package/dist/runtime.js.map +1 -0
  133. package/dist/sanitise.d.ts +116 -0
  134. package/dist/sanitise.d.ts.map +1 -0
  135. package/dist/sanitise.js +247 -0
  136. package/dist/sanitise.js.map +1 -0
  137. package/dist/scan.d.ts +60 -0
  138. package/dist/scan.d.ts.map +1 -0
  139. package/dist/scan.js +246 -0
  140. package/dist/scan.js.map +1 -0
  141. package/dist/screens.d.ts +98 -0
  142. package/dist/screens.d.ts.map +1 -0
  143. package/dist/screens.js +301 -0
  144. package/dist/screens.js.map +1 -0
  145. package/dist/settle.d.ts +65 -0
  146. package/dist/settle.d.ts.map +1 -0
  147. package/dist/settle.js +162 -0
  148. package/dist/settle.js.map +1 -0
  149. package/dist/shots.d.ts +109 -0
  150. package/dist/shots.d.ts.map +1 -0
  151. package/dist/shots.js +113 -0
  152. package/dist/shots.js.map +1 -0
  153. package/dist/style.d.ts +47 -0
  154. package/dist/style.d.ts.map +1 -0
  155. package/dist/style.js +154 -0
  156. package/dist/style.js.map +1 -0
  157. package/dist/suite.d.ts +218 -0
  158. package/dist/suite.d.ts.map +1 -0
  159. package/dist/suite.js +219 -0
  160. package/dist/suite.js.map +1 -0
  161. package/dist/summary.d.ts +268 -0
  162. package/dist/summary.d.ts.map +1 -0
  163. package/dist/summary.js +1308 -0
  164. package/dist/summary.js.map +1 -0
  165. package/dist/unscannable.d.ts +75 -0
  166. package/dist/unscannable.d.ts.map +1 -0
  167. package/dist/unscannable.js +111 -0
  168. package/dist/unscannable.js.map +1 -0
  169. package/dist/versions.d.ts +13 -0
  170. package/dist/versions.d.ts.map +1 -0
  171. package/dist/versions.js +39 -0
  172. package/dist/versions.js.map +1 -0
  173. package/dist/wcag-map.d.ts +19 -0
  174. package/dist/wcag-map.d.ts.map +1 -0
  175. package/dist/wcag-map.js +52 -0
  176. package/dist/wcag-map.js.map +1 -0
  177. package/dist/with-setsquare.d.ts +26 -0
  178. package/dist/with-setsquare.d.ts.map +1 -0
  179. package/dist/with-setsquare.js +70 -0
  180. package/dist/with-setsquare.js.map +1 -0
  181. package/package.json +81 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,57 @@
1
+ Setsquare
2
+ Copyright (c) 2026 Setsquare
3
+
4
+ This product includes software developed by the Setsquare project
5
+ (https://setsquare.dev).
6
+
7
+ --------------------------------------------------------------------------------
8
+ Licence
9
+ --------------------------------------------------------------------------------
10
+
11
+ The published Setsquare packages are licensed under the Apache License, Version
12
+ 2.0. Each package ships the full licence text as its own LICENSE file, and this
13
+ NOTICE alongside it, as Apache-2.0 section 4 requires.
14
+
15
+ The licence text was retrieved verbatim from
16
+ https://www.apache.org/licenses/LICENSE-2.0.txt and is never retyped. Recorded at
17
+ the moment it was fetched:
18
+
19
+ Fetched 2026-09-09T13:44:38Z
20
+ Bytes 11358
21
+ sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30
22
+
23
+ The canonical copy lives at `licenses/Apache-2.0.txt` in the source repository;
24
+ every package's LICENSE is a byte-identical copy of it, and
25
+ `scripts/verify-packages.mjs` fails the release if any of them drifts.
26
+
27
+ THIS REPOSITORY AS A WHOLE IS NOT APACHE-2.0, which is why there is no LICENSE
28
+ file at its root. What runs on someone else's machine is Apache-2.0; what runs on
29
+ ours is proprietary, all rights reserved — `apps/api`, `apps/portal` and
30
+ `apps/marketing` are not published and are not covered by this notice. The
31
+ boundary is decision D3.
32
+
33
+ APACHE-2.0 IS OSI-APPROVED, BUT THIS IS NOT AN OPEN-SOURCE PROJECT. The source
34
+ repository is private and the packages ship built output, so a recipient gets an
35
+ OSI licence over a binary distribution. That is coherent and lawful, and it is not
36
+ the same thing. The accurate phrase is "Apache-2.0 licensed".
37
+
38
+ --------------------------------------------------------------------------------
39
+ Trademarks
40
+ --------------------------------------------------------------------------------
41
+
42
+ "Setsquare" and the Setsquare logo are trademarks of the Setsquare project. No
43
+ trademark licence is granted by the Apache License — section 6 reserves this
44
+ expressly — and none is granted by this notice. You may state accurately that
45
+ your software uses or is compatible with Setsquare; you may not use the name or
46
+ the mark in a way that suggests endorsement by, or affiliation with, the project.
47
+
48
+ The name is never abbreviated. There is no "sq" form, in any surface, ever.
49
+
50
+ --------------------------------------------------------------------------------
51
+ Third-party software
52
+ --------------------------------------------------------------------------------
53
+
54
+ Packages that redistribute or depend on third-party software carry their own
55
+ THIRD-PARTY-NOTICES.md alongside this file. See
56
+ `packages/review-sdk/THIRD-PARTY-NOTICES.md` for the axe-core (MPL-2.0) position
57
+ in particular.
package/README.md ADDED
@@ -0,0 +1,338 @@
1
+ # @setsquare/review-sdk
2
+
3
+ Accessibility, e2e and performance evidence from the Playwright suite you already
4
+ have.
5
+
6
+ One line in your config. No test edits. With no token set, **nothing leaves your
7
+ machine**: scans run, a summary prints, and a JSON evidence file lands on disk
8
+ that is yours to keep.
9
+
10
+ > The brand is Setsquare and so is everything you type — `setsquare`, written in
11
+ > full, with no short form.
12
+
13
+ **Licence: Apache License 2.0** (SPDX `Apache-2.0`). Use it, modify it, vendor it,
14
+ mirror it internally — including in CI, Docker layers and a committed
15
+ `node_modules` — and redistribute it, subject to the licence's own conditions:
16
+ retain the notices, state your changes, and ship the `NOTICE` file along with the
17
+ `LICENSE`. It carries an express patent grant (§3) and reserves our trademarks
18
+ (§6). Stated here rather than at the bottom, because if your review process gates
19
+ on licences you should not have to scroll to find that out.
20
+
21
+ Apache-2.0 is OSI-approved, so this should clear a dependency policy without a
22
+ conversation. It is still not accurate to call Setsquare an open-source project:
23
+ the source repository is private and this package ships built output, so you have
24
+ an OSI licence over a binary distribution. **"Apache-2.0 licensed" is the true
25
+ phrase**, and npm provenance attestation needs a public repository and so is not
26
+ available yet.
27
+
28
+ *This was previously the Elastic License 2.0, which forbade offering the software
29
+ as a hosted or managed service. That restriction is gone — not narrowed.*
30
+
31
+ ---
32
+
33
+ ## Before you install anything
34
+
35
+ ```bash
36
+ npx @setsquare/review-cli audit
37
+ ```
38
+
39
+ Reads your repository and tells you what your suite already covers — which routes
40
+ it visits, which key journeys have no coverage, whether you already run axe and at
41
+ what level. It writes nothing, changes nothing, and sends nothing anywhere.
42
+
43
+ ## Quickstart
44
+
45
+ ```bash
46
+ npm i -D @setsquare/review-sdk
47
+ npx setsquare init
48
+ npx playwright test
49
+ ```
50
+
51
+ `setsquare init` adds two lines to your Playwright config and tells you what it found.
52
+ If you have more than one config it will ask which, rather than guessing — configs
53
+ often overlap deliberately, and picking one for you is not its call.
54
+
55
+ The two lines it adds:
56
+
57
+ ```ts
58
+ import { withSetsquare } from '@setsquare/review-sdk';
59
+
60
+ export default withSetsquare(defineConfig({/* your config, untouched */}));
61
+ ```
62
+
63
+ Then add `.setsquare/` to your `.gitignore`.
64
+
65
+ ## What you get
66
+
67
+ Every settled page in your suite is scanned against **WCAG 2.2 AA**, and the run
68
+ ends with a summary:
69
+
70
+ ```
71
+ Setsquare — accessibility evidence
72
+
73
+ Scanned 4 surfaces in 2 themes, assessed against WCAG 2.2 AA.
74
+ 1 rule failing on 4 elements. 600 checks passed.
75
+
76
+ serious color-contrast — WCAG 1.4.3
77
+ 4 elements on 4 surfaces: privacy · light, terms · light, cookies ·
78
+ light, accessibility · light
79
+ https://dequeuniversity.com/rules/axe/4.13/color-contrast
80
+
81
+ 4 of 8 scanned contexts had no violations at all.
82
+ ```
83
+
84
+ and an evidence file at `.setsquare/runs/<timestamp>/run.json` — the full findings,
85
+ their WCAG criteria, measured contrast ratios, the exact ruleset used, and
86
+ performance timings.
87
+
88
+ ## Every screenshot on one page
89
+
90
+ Playwright takes the screenshots; reading them means opening its report and
91
+ clicking into each test in turn. So nobody does, and a change that visibly broke
92
+ a page ships because every assertion still held.
93
+
94
+ Every run also writes `.setsquare/runs/<timestamp>/screens.html` — one scrollable page
95
+ with each test's name and its captures beneath it, comparisons first, then
96
+ failures, then the rest in the order they ran. It is a contact sheet for a person
97
+ to scan in thirty seconds before they approve something:
98
+
99
+ ```bash
100
+ setsquare screens --open
101
+ ```
102
+
103
+ The same section appears inside `report.html`, so whoever is handed the evidence
104
+ file gets the pictures too.
105
+
106
+ **Setsquare never takes a screenshot.** It indexes the ones Playwright already
107
+ wrote and links to them where they lie — no pixels are copied, and none are
108
+ written by this package (its test suite fails if any shipped file so much as names
109
+ an image format). Three ways to give it something to index:
110
+
111
+ - `use: { screenshot: 'on' }` in your Playwright config. One capture per test, and
112
+ no other change to your suite.
113
+ - `await expect(page).toHaveScreenshot()`. Playwright compares against your
114
+ committed baseline; the sheet puts expected, actual and difference side by side.
115
+ - Attach your own at the moments that matter, which turns the sheet into a
116
+ walkthrough of the flow:
117
+
118
+ ```ts
119
+ import { maskLocators } from '@setsquare/review-sdk';
120
+
121
+ async function step(page, testInfo, name) {
122
+ const path = testInfo.outputPath(`${name}.png`);
123
+ await page.screenshot({ path, mask: maskLocators(page), fullPage: true });
124
+ await testInfo.attach(name, { path, contentType: 'image/png' });
125
+ }
126
+ ```
127
+
128
+ `path`, not `body`: an attachment given a body stays in Playwright's memory,
129
+ never reaches disk, and cannot be linked to. The sheet says so when it happens
130
+ rather than quietly showing fewer pictures.
131
+
132
+ What the sheet does **not** do is compare anything of its own. There is no
133
+ baseline here and no history — "is this different from last week?" is the hosted
134
+ platform, deliberately. Where you see a comparison, Playwright made it.
135
+
136
+ ## Naming what you scan
137
+
138
+ Auto-scan covers what your tests already visit. For states it cannot reach on its
139
+ own — a modal that is open, a form showing validation errors — name them:
140
+
141
+ ```ts
142
+ import { setsquare } from '@setsquare/review-sdk';
143
+
144
+ test('the editor reports validation errors accessibly', async ({ page }) => {
145
+ await page.goto('/jobs/42/edit');
146
+ await page.getByRole('button', { name: 'Save' }).click();
147
+
148
+ await setsquare.scan(page, 'job-editor', { state: 'validation-errors' });
149
+ });
150
+ ```
151
+
152
+ An explicit scan always outranks an inferred one for the same context.
153
+
154
+ ## Configuration
155
+
156
+ Everything is optional. An empty options object produces a useful run.
157
+
158
+ ```ts
159
+ export default withSetsquare(defineConfig({/* … */}), {
160
+ wcag: 'AAA', // default 'AA'
161
+ bestPractice: true, // axe's advisory rules; not WCAG failures
162
+ personas: { 'a11y-admin': 'recruiter' },
163
+ themes: { 'dark-suite': 'dark' },
164
+ surfaces: { '/jobs/:id/edit': 'job-editor' },
165
+ mask: ['.candidate-name'],
166
+ outputDir: '.setsquare',
167
+ promo: false,
168
+ });
169
+ ```
170
+
171
+ **Why AA by default.** It is what conformance means in practice, and what
172
+ EN 301 549 and procurement ask for. AAA is a deliberate commitment — WCAG itself
173
+ does not recommend it as a general policy — so opting in is the honest default.
174
+
175
+ **Themes** are read from `data-theme` on the live page when your suite toggles
176
+ them in-test, so a suite whose project names carry no theme still gets one context
177
+ per theme without configuration.
178
+
179
+ ## One logical run across several Playwright invocations
180
+
181
+ **If you run `playwright test` once — with any number of workers — you already
182
+ get one report and can skip this section.** Worker parallelism inside a single
183
+ invocation needs no setup: the workers observe, the one reporter writes, and
184
+ one run lands on disk. That is the default, and most suites never need more.
185
+
186
+ You need this section only when one suite execution makes **several**
187
+ `playwright test` calls. In practice that means one thing: Playwright's
188
+ `workers` setting is global, so a suite that needs a serial lane (tests that
189
+ write shared state) _and_ a parallel lane (read-only sweeps at `--workers=4`)
190
+ has to run as two invocations. Without help, each invocation writes its own
191
+ run, and one suite execution looks like two half-runs.
192
+
193
+ Setsquare cannot detect this by itself — nothing on the machine distinguishes
194
+ "one script making two passes" from "you running your suite twice", and merging
195
+ two unrelated runs would fabricate a run that never happened. So the script
196
+ that makes the calls declares it, with three variables: mint **one id per
197
+ execution** and export it to every invocation:
198
+
199
+ ```bash
200
+ export SETSQUARE_RUN_ID="run-$(date +%s)-$$" # one id per suite execution
201
+ export SETSQUARE_RUN_PARTS=2 # how many invocations you will make
202
+
203
+ SETSQUARE_LANE=functional SETSQUARE_AUTOSCAN=0 npx playwright test --project=functional --workers=1
204
+ SETSQUARE_LANE=a11y npx playwright test --project=a11y --workers=4
205
+ ```
206
+
207
+ `SETSQUARE_AUTOSCAN=0` on the functional lane is the cost lever: axe is the bulk of
208
+ the SDK's per-test overhead, and a lane whose surfaces the a11y lane scans
209
+ anyway would pay it twice for evidence the merge deduplicates. The lane still
210
+ contributes everything else — test outcomes, navigation observations (so the
211
+ visited-but-never-scanned accounting stays union-aware), and explicit
212
+ `setsquare.scan()` calls, which always run. Leave it unset on any lane that is your
213
+ only scanner of some surface.
214
+
215
+ All invocations sharing the id merge into **one** run at
216
+ `.setsquare/runs/group-<id>/` — one `run.json`, one `report.html`, one `screens.html`
217
+ spanning every lane — with every
218
+ accounting computed over the union: a surface visited in pass 1 and scanned in
219
+ pass 2 is covered, not "visited but never scanned". Concurrent invocations are
220
+ safe; so are the parallel workers inside each one.
221
+
222
+ The merged `run.json` carries the group facts where a consumer can query them:
223
+ `source.runGroup` holds `{ id, coverage, completed, expectedParts }` — where
224
+ `coverage` is `complete` only against a declared census, `partial` when
225
+ evidence is known absent, and `unknown` otherwise — and every result row
226
+ carries its `lane`. Test ids are additionally prefixed (`a11y :: …`) so the
227
+ same test run in two lanes stays two rows. The sidecar `meta.json` holds the
228
+ full per-invocation breakdown.
229
+
230
+ The variables:
231
+
232
+ - **`SETSQUARE_RUN_ID`** — the group identity. Mint a **fresh** id per suite
233
+ execution (a CI build id is ideal; a branch name is not — reusing an id
234
+ across executions gets the stale parts excluded with a warning). When the
235
+ variable is absent, nothing changes: a solo `playwright test` behaves exactly
236
+ as before.
237
+ - **`SETSQUARE_LANE`** _(optional)_ — a label for this invocation. It prefixes the
238
+ merged run's test ids (`a11y :: suite > spec > test`), groups the report's
239
+ provenance table, and keeps the same test's results from two lanes apart.
240
+ - **`SETSQUARE_RUN_PARTS`** _(optional but recommended)_ — how many invocations this
241
+ execution will make. This is the **only** way the merged artifact can say
242
+ "complete": an invocation that crashes before it starts is invisible, so
243
+ without a declared count the honest verdict is "unknown". A wrong count fails
244
+ safe — it reads as partial, never as falsely complete.
245
+
246
+ If an invocation crashes mid-run, the merged run still exists, is marked
247
+ partial, and says which invocation's evidence is absent — absent, never clean.
248
+ Sharding works the same way: `SETSQUARE_RUN_ID` shared across shards,
249
+ `SETSQUARE_LANE=shard-1` and so on.
250
+
251
+ Two cautions. Every invocation must resolve the same `.setsquare` directory (same
252
+ config directory and `outputDir`), or the group silently splits. And truly
253
+ _concurrent_ invocations should give Playwright itself distinct `outputDir` /
254
+ report folders — Playwright's own artifacts are not merge-aware; setsquare's are.
255
+
256
+ ## What it will not do
257
+
258
+ - **Fail your build.** A scan error warns; your tests keep their own verdicts.
259
+ - **Phone home.** No telemetry, no error reporting, no version checks — with or
260
+ without a token. There is no network client in this package at all, and its test
261
+ suite asserts that there never will be.
262
+ - **Write images.** The contact sheet above indexes and links to the screenshots
263
+ Playwright wrote; it copies none of them and this package writes none of its
264
+ own. Masking is built and proven, but the local path holds no pixels, so an
265
+ unmasked screenshot cannot end up on your disk through us.
266
+ - **Compare screenshots.** Pixel comparison against a stored baseline is a
267
+ platform capability. Locally you get Playwright's own comparisons, presented.
268
+ - **Compare runs.** No history, no baselines, ever, locally. The moment the
269
+ question is "better or worse than last week", that is the hosted platform.
270
+
271
+ ## Untrusted content
272
+
273
+ Selectors and class names come from your page's DOM, which routinely contains
274
+ third-party embeds and user-generated content. This SDK treats every page-derived
275
+ string as attacker-influenceable: capped at ten representative selectors, length
276
+ limited, and stripped of control, zero-width and bidi characters — while leaving
277
+ genuine content intact, because encoding belongs at each sink rather than at the
278
+ source.
279
+
280
+ There is a deliberately malicious page in the test suite, permanently.
281
+
282
+ ## Supply chain
283
+
284
+ This SDK runs inside your CI, so a compromised release would be the worst thing
285
+ that could happen to us. Builds come from CI and never from a laptop, publishing
286
+ is token-less (npm trusted publishing over OIDC, so there is no long-lived
287
+ credential to steal), and the runtime dependency tree is `axe-core` and our own
288
+ contract package.
289
+
290
+ Two people review every release. That is a practice we hold ourselves to, not a
291
+ control the platform enforces — branch protection is unavailable on a private
292
+ repository on our plan, so treat it as a statement about how we work rather than
293
+ a guarantee you can verify.
294
+
295
+ **What we do not have, said plainly: npm provenance attestation.** It requires a
296
+ public source repository and ours is private, so no attestation is generated —
297
+ and a supply-chain section that implied otherwise would be exactly the kind of
298
+ unearned claim this tool exists to catch. Keeping the source private is a
299
+ decision we have taken rather than one we are still weighing, so attestation is
300
+ not on its way. If it is a hard requirement for you, tell us — that is useful to
301
+ know, and it is the kind of thing that changes a decision.
302
+
303
+ The `repository` field names `Worktree-Amigos/setsquare` — the team's GitHub org,
304
+ which is private. The org name and the product name differ on purpose.
305
+
306
+ ## Compatibility
307
+
308
+ **Node 22 or later.** That is the oldest active LTS line, and the floor our
309
+ compatibility matrix tests. `@playwright/test` itself allows Node 20, so we will
310
+ never be the reason an install fails on a runtime Playwright supports — we simply
311
+ do not claim a floor we have decided not to verify, and Node 20 left support in
312
+ April 2026.
313
+
314
+ `@playwright/test` (JS/TS) only. The fixture and reporter model this is built on
315
+ exists only in the JS/TS runner; other language bindings would be separate SDKs
316
+ speaking the same versioned wire contract. The **application** you scan can be
317
+ written in anything — axe runs against the rendered DOM.
318
+
319
+ ## Reporting a problem
320
+
321
+ Bugs, questions and security reports all go to <https://setsquare.dev/report>,
322
+ which files a tracked issue directly. There is no public issue tracker — this
323
+ repository is private — so the form is the whole route in, and it is watched.
324
+
325
+ **Not open to outside contributions yet.** The source is not published pre-1.0,
326
+ so there is nowhere to send a pull request. That is a deliberate position rather
327
+ than an oversight, and it will be revisited.
328
+
329
+ ## Licence
330
+
331
+ Apache License 2.0 — see [LICENSE](./LICENSE) and [NOTICE](./NOTICE). Free to use,
332
+ modify, vendor, mirror and redistribute, provided you retain the notices, state
333
+ your changes and pass on the `NOTICE`. Express patent grant; trademarks reserved.
334
+
335
+ OSI-approved, but this is not an open-source project — the repository is private
336
+ and the package ships built output. Say "Apache-2.0 licensed". (Decision `P0-D3`,
337
+ revised 2026-09-08 from the Elastic License 2.0, whose hosted-service restriction
338
+ no longer applies.)
@@ -0,0 +1,61 @@
1
+ # Third-party notices
2
+
3
+ `@setsquare/review-sdk` redistributes or depends on the following third-party
4
+ software. Nothing in this file grants rights to Setsquare's own code, which is
5
+ licensed under the **Apache License 2.0** — see [LICENSE](./LICENSE) and
6
+ [NOTICE](./NOTICE).
7
+
8
+ This file is separate from `NOTICE` on purpose. `NOTICE` is the Apache-2.0 §4(d)
9
+ notice for Setsquare's own work and must be propagated by anyone redistributing
10
+ this package; this file records what other people's software is in here and under
11
+ what terms. Conflating them would make it unclear which obligations travel with a
12
+ redistribution.
13
+
14
+ ## axe-core
15
+
16
+ - Copyright © Deque Systems, Inc.
17
+ - License: Mozilla Public License 2.0 (MPL-2.0), <https://www.mozilla.org/en-US/MPL/2.0/>
18
+ - Source: <https://github.com/dequelabs/axe-core>
19
+
20
+ The SDK injects axe-core into pages under test **byte-for-byte, unmodified**,
21
+ including its embedded license banner, which must never be stripped or
22
+ minified away. If a future build step bundles or minifies axe, `/*!`-style
23
+ comments must be preserved. Setsquare's own checks talk to axe through its
24
+ public `configure`/`run` API and are separate files forming a Larger Work
25
+ under MPL-2.0 §3.3; they are implemented from the WCAG and ACT specifications,
26
+ not from axe's rule source.
27
+
28
+ **Setsquare's own licence changing does not affect this.** MPL-2.0 §3.3 permits
29
+ the Larger Work to be distributed under terms of our choosing so long as the
30
+ Covered Software itself stays under MPL-2.0, which is why the argument held under
31
+ the Elastic License 2.0 and holds unchanged under Apache-2.0. The obligation that
32
+ actually matters is the one above — axe-core travels byte-for-byte with its banner
33
+ intact — and it is a property of how the SDK injects axe, not of our licence.
34
+
35
+ ## text-readability
36
+
37
+ - Copyright © 2019 Utkarsh Raj
38
+ - License: the repository's LICENSE file is MIT; the npm metadata says ISC.
39
+ Both are permissive; we record both and retain the copyright either way.
40
+ - Source: <https://github.com/clearnote01/readability>
41
+
42
+ Used Node-side only (readability scoring for the `setsquare-reading-level`
43
+ heuristic). It is never injected into customer pages; if that ever changes,
44
+ this notice must ship inside the injected bundle too.
45
+
46
+ ## W3C ACT rules test cases
47
+
48
+ **None are present today**, and this section is the standing rule for if any are
49
+ added rather than a description of what ships. Checked 2026-09-09: `src/checks/`
50
+ holds only our own TypeScript, and no fixture NOTICE file exists anywhere in the
51
+ package. The previous wording described the copied fixtures and their per-directory
52
+ NOTICE files as though they were already here, hedged only by a "(when present)"
53
+ in the heading — which is the kind of sentence this repository keeps having to
54
+ correct, so it is stated the other way round now.
55
+
56
+ Should ACT test-case fixtures be vendored later: they are copied verbatim from the
57
+ ACT-Rules Community Group repository under the W3C Software and Document Notice
58
+ and License, <https://www.w3.org/copyright/software-license/>; each fixture
59
+ directory carries its own NOTICE naming the rule, the source URI and the W3C
60
+ copyright line (© W3C® — MIT, ERCIM, Keio, Beihang); and fixtures are never edited
61
+ beyond mechanical harness wrapping.