Commit 32cb302
committed
fix(tools): correctness and robustness fixes from the upstream backlog
Seven long-open upstream fixes, verified in a real browser.
ASCII text drawer (CorentinTh#1774/CorentinTh#1690/CorentinTh#1685/CorentinTh#1651 - four PRs for one bug): fonts were
fetched from a protocol-relative `//unpkg.com/figlet@1.6.0/fonts/` URL, pinned
to a version the project no longer installs. That resolves to file:// when the
build is opened from disk, is blocked by strict connect-src policies, and
leaves the tool stuck on "Loading font..." with no error whenever the CDN is
unreachable - which is exactly what it did here before this change. The fonts
are now emitted into the bundle by a small Vite plugin and served from the
deployment's own origin, so the tool works offline and has no third-party
runtime dependency. They are still fetched individually on demand, so the
initial payload is unchanged.
text-to-binary (CorentinTh#1085): encoded with charCodeAt per character, so anything
above U+00FF produced more than eight bits and broke the octet grouping, and
split('') tore surrogate pairs apart. Now encodes UTF-8, so every group is
exactly eight bits and any script round-trips.
text-to-unicode (CorentinTh#1087): same surrogate-pair bug - an emoji became two
meaningless entities. Now iterates by code point.
bcrypt (CorentinTh#1152): hashSync and compareSync throw on an out-of-range salt count
and on a malformed hash. Those throws escaped a computed during render and
blanked the whole tool; both are now guarded.
Hash text (CorentinTh#986): adds the explicit SHA3-224/256/384/512 output sizes, since
crypto-js silently defaults SHA3 to 512 bits.
UUID generator (CorentinTh#1441): adds v6 and v7, which required uuid 9 to 11. The node
identifier option changed from number[] to Uint8Array in that major, and the
validation pattern now accepts versions 1-7.
Command palette (CorentinTh#1440): the per-category result cap of five was written for
the original tool set; with well over a hundred tools a search for "json" or
"ip" hid most of its own matches. Raised to twelve.
The API's hash and UUID endpoints pick up the new algorithms and versions.
Lint, 356 unit tests, both typechecks, the build and all 72 Playwright e2e
tests pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019u4HjVENAajio7cxNSDzir1 parent 669a38b commit 32cb302
17 files changed
Lines changed: 176 additions & 40 deletions
File tree
- server
- routes
- src
- modules/command-palette
- tools
- ascii-text-drawer
- bcrypt
- hash-text
- text-to-binary
- text-to-unicode
- uuid-generator
- ui
- c-select
- c-table
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
| 148 | + | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
164 | 170 | | |
165 | 171 | | |
166 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
84 | 88 | | |
85 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
86 | 93 | | |
87 | 94 | | |
88 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
16 | 19 | | |
17 | | - | |
| 20 | + | |
18 | 21 | | |
| 22 | + | |
19 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
32 | 54 | | |
0 commit comments