dns-query calls Cloudflare DNS over HTTPS and rdap.org, so offline mode
now hides it like dns-queries.
The gitattributes download commands are now built from the URLs the
preview was generated from. When the snapshot was used, they point at the
snapshot commit instead of master, so they reproduce what is shown.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Offline, explainshell now always uses the configured explainchain.url.
Before, a URL the browser had stored earlier (the public
explainshell.com) overrode it.
ocr-image's lang-url template may now name the file
(.../{lang}.traineddata.gz). tesseract.js appends that file name itself,
so the template is reduced to its directory instead of requesting a
duplicated path.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add json-schemas.catalog-url, currency-converter.url and
geo-coordinates-converter.tile-url. Offline without a mirror, schema
validation offers custom schemas only, the map is not shown and the
currency converter is hidden. Show the external-access badge on the
YAML viewer and the coordinates converter.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Offline mode uses the snapshot only; online, it replaces the hardcoded
fallback list when GitHub can't be reached. Refresh it with
pnpm script:update:git-templates.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ship the ONNX runtime, the ffmpeg core, the tesseract worker and core and
English/Simplified Chinese OCR data instead of loading them from
jsdelivr. They load only when their tool runs and are left out of the
PWA precache. Models and other OCR languages can come from an intranet
mirror (transformers.models-url, ocr-image.lang-url). Remove math-ocr's
leftover MathJax typings: MathJax is no longer used.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The root-absolute /Beep.mp3 (also fixed in pomodoro-timer, in the previous commit) broke when IT-Tools is served from a subfolder.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
md-editor-v3 loaded highlight.js, katex, mermaid, prettier, cropper,
screenfull and echarts from unpkg.com; the two other tools loaded Google
Fonts. All of them now come from the app.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
"offline": true in tools-settings.json hides tools that need internet
access (menus and routes). Tools declare it with requiresInternet, either
always or unless an intranet mirror is configured. The settings helper
lives in a module without top-level await so eagerly loaded tool
index.ts files can use it without delaying app boot.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add fonts, md-editor extensions, the ffmpeg core, the tesseract core and
English/Simplified Chinese OCR data so tools stop loading them from
third-party CDNs. Remove currency-exchanger-js and @ffmpeg/util, which
nothing imports anymore. Patch curlconverter to resolve its wasm files
against the page's <base href> so curl-converter works in a subfolder.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Fix machine-translation errors, make terminology consistent, add spacing
between CJK and Latin text, use full-width punctuation, and add the two
missing database-builder keys.
Restore the externalAccess "null" sentinel that had been translated as
无效的 and restore code samples that had been translated.
Refs sharevb/it-tools#571
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Visual Subnet Calculator loads its subnet map from `?c=` shareable links
and imported configs, then wrote subnet keys, notes and colours into the
table HTML unescaped. A crafted link could run script on the it-tools
origin. addRow() now escapes the network, note and ancestor keys in join
cells, and only accepts hex colours. Allocation results, validation
issues, warnings, the network-boundary notice and caught exception
messages are escaped as well.
zpool-calc wrote the vdev type <select> value with .html(); use .text().
Both are vendored files; reapply if they are updated from upstream.
Fixes CodeQL js/xss-through-dom and js/xss-through-exception alerts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`(?:[^']+|(?<=\\)')+` nests quantifiers and backtracks exponentially on long
unterminated values. Use one `'(?:[^'\\]|\\.)*'` pattern for both extracting
and replacing. Extraction used `(.*?)`, which stopped at the first escaped
quote (`'It\'s'` became `It\`); it now reads the whole value and decodes
JS string escapes (\n, \xHH, \uHHHH, \u{...}, \') before writing the
locale file.
Fixes CodeQL js/redos alerts in scripts/extract-tools-desc.mjs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The database name, account and server address are prefilled from URL query
parameters and were pasted into the script as is, so a crafted link could
add statements to the SQL a user copies and runs (e.g. a database name
containing `` `; DROP DATABASE prod; -- ``). A password containing `'` also
produced invalid SQL.
- Quote identifiers and string literals per dialect.
- PostgreSQL passwords containing a backslash are emitted as E'' strings,
which parse the same whatever standard_conforming_strings is set to.
- Oracle has no escape for `"` in quoted names or passwords, so either one
containing `"` shows a validation error instead of generating SQL. Plain
Oracle names stay unquoted since quoting makes them case-sensitive.
- Newlines in values that land in SQL comments are flattened.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`src/utils/random.ts` was built on Math.random(), and it backs the token
generator, htpasswd salts and the passphrase suffixes. The PIN code
generator and the database builder's default password called Math.random()
directly. All now go through crypto.getRandomValues() with rejection
sampling, so indices are unbiased, for ranges up to 2^53.
The passphrase generator no longer calls generateSillyPassword(), which also
picks words with Math.random(). It uses the package's word lists with the
secure helpers, and skips pulling lodash and zxcvbn into the bundle.
Behaviour changes that came with it:
- randIntFromInterval() now includes its upper bound. The lorem ipsum
sliders could never reach their maximum and the passphrase generator never
put a number on the last word. The coin flipper used `0..10 % 2`, which
would be biased with an inclusive range, so it now draws 0 or 1.
- randIntFromInterval() orders reversed bounds, rounds fractional ones
inward and returns NaN for non-finite input instead of throwing.
- The lorem ipsum generator falls back to its defaults for malformed
`paragraphs`, `sentences` and `words` URL values and clamps them to the
slider ranges, so a link like `?sentences=[1,4294967297]` cannot freeze
the page.
- Passphrases whose length equals the min or max length are accepted.
- Multi-word list entries ("wide eyed") count as one word, so the word count
and number placement match the settings.
- Token generator draws each character independently instead of shuffling
the alphabet repeated `length` times.
Fixes the CodeQL js/insecure-randomness alert in the passphrase generator.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
String replace() only replaced the first `[`, `]`, `(` and `)`, and link
text backslashes were left as is. Use global regexes and escape
backslashes too.
Fixes CodeQL js/incomplete-sanitization alerts in the tool layout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turndown only applies rules to element nodes; text nodes always go through
its built-in escape(). The `escapeText` rules and their `escapeMarkdown`
helpers in HTML to Markdown, HTML to data and EPUB to Markdown were never
called. They also escaped `|` twice, which would have produced `\\|` had
anyone wired them up. Output is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pipes were escaped but backslashes were not, so a cell ending in `\` turned
the added `\|` into `\\|` and the pipe split the cell. The object-array
Markdown export also left newlines in cells, which broke the row; they now
become `<br>` like in the Markdown table generator.
Fixes CodeQL js/incomplete-sanitization alerts in the Markdown table
generator and the object-array export.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unescaping backslashes before `\n`, `\t` and friends decoded escaped
backslashes twice: `\\n` in an escaped JSON string became a raw newline
instead of `\n`, so parsing failed with "invalid character". A single
replace with a lookup table decodes each escape exactly once.
Fixes the CodeQL js/double-escaping alert.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment check passed its pattern as a string, so every `\s` became a
literal `s`. Lines starting with `s` that contained `//` or ended in `/`
(e.g. `site = https://example.com`) were dropped as comments. Lines are
already trimmed, so only `//` and lone `/` lines need skipping.
`spacesRegx` and `newLineRegx` lacked the global flag: prop names kept all
but their first space, and whitespace-only lines were treated as content.
Fixes CodeQL js/useless-regexp-character-escape and js/incomplete-sanitization
alerts in src/utils/objgen.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generate gzip sidecars for JavaScript, CSS, and WebAssembly assets during the image build. Serve them through nginx when clients accept gzip, including proxied requests, while preserving uncompressed fallback and runtime HTML base-path rewriting.
* ci: move to pnpm 12, pnpm/setup v3 and faster, pinned CI
pnpm 12.6.0 is declared in devEngines.packageManager instead of
packageManager, so pnpm/setup, the Dockerfile and local installs all pick
the same version; the lockfile records the resolved binary. Every workflow
moves to pnpm/setup v3, and the Vercel workflows gain a setup step so
`vercel build` runs with that pnpm rather than whatever is on the runner.
CI time:
- ci runs format check, lint, unit tests, typecheck and build as parallel
steps instead of one after another.
- E2E builds the app once and shares dist with the three browser jobs
instead of rebuilding it in each.
- ci and E2E cancel superseded runs on the same ref.
- The Docker latest/baseurl workflows no longer repeat ci's checks. They
run on workflow_run after ci succeeds for a push, and build the commit
ci tested.
Runners are pinned to ubuntu-26.04-arm. CodeQL stays on x64
(ubuntu-26.04): only the x64 image ships the CodeQL bundle in its tool
cache. The Playwright cache key now includes the runner architecture.
Every action is pinned to its latest release by commit SHA with a version
comment, the Dockerfile base images by digest, and the pnpm and Vercel CLI
installs to exact versions, matching the Renovate presets already enabled
(helpers:pinGitHubActionDigests, docker:pinDigests).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017s2w39tKNdBdD8kyfThuLy
* ci: deploy to Vercel from one workflow with previews and a concurrency group
Replaces sharevb-vercel-preview.yml and sharevb-vercel-prod.yml with
deploy.yaml, which builds here and deploys the prebuilt output:
- One concurrency group per ref with cancel-in-progress, so a burst of
pushes costs one deployment instead of one per push.
- A GitHub environment per run (Production or Preview), which restores the
Environments sidebar and the PR's "View deployment" button.
- Pull requests build their own head commit, named after the PR branch so
Vercel shows the branch rather than "HEAD"; runs from forks are skipped,
since they get no secrets.
- Fails early on missing secrets, refuses to deploy a build without
index.html, and pins the Vercel CLI.
The production hostname for sitemap.xml and robots.txt comes from the
VERCEL_PRODUCTION_URL repository variable instead of being hardcoded, so
the same file serves any deployment. Secrets can live on the repository
or on the Production/Preview environments.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017s2w39tKNdBdD8kyfThuLy
* build: stop compiling tree-sitter's native addon
curlconverter depends on tree-sitter and tree-sitter-bash for its Node
shell parser, but the app only uses curlconverter in the browser, where its
`browser` field swaps in web-tree-sitter (WASM). The native addon is never
loaded.
Building it anyway broke installs: tree-sitter 0.21 ships prebuilds only for
darwin-x64 and win32-x64, so Linux compiles it from source, and its C++17
flags fail against Node 24.21's headers, which require C++20. That is what
failed pnpm install on the arm64 runners.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017s2w39tKNdBdD8kyfThuLy
* ci(e2e): run the browser jobs on x64
On ubuntu-26.04-arm the Playwright suite ran over 7x slower: chromium was
still in the test step after 27 minutes, against under 4 on x64. The build
job stays on arm; its output is architecture-independent.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017s2w39tKNdBdD8kyfThuLy
* test(e2e): stop the preview server with SIGTERM so runs exit
pnpm 12 starts the script it runs in its own process group. Playwright
stops its webServer by SIGKILLing the `pnpm preview` process group, which
no longer contains vite: vite survives, keeps the output pipes open, and
Playwright waits on it forever. The E2E jobs finished every test and then
hung until the job timeout.
pnpm 12.6 forwards SIGTERM to the script it runs, so stop the server with
SIGTERM instead. Locally with pnpm 12.6.0: 112 tests in 1.8 min, clean
exit, nothing left listening on the port.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017s2w39tKNdBdD8kyfThuLy
* Revert "ci(e2e): run the browser jobs on x64"
The slowdown blamed on arm was the Playwright webServer hang fixed in the
previous commit: every test had finished and the job was waiting on an
orphaned vite process. The suite is not slower on arm, so the browser jobs
go back to ubuntu-26.04-arm like the rest.
This reverts commit 9f5af383.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017s2w39tKNdBdD8kyfThuLy
* ci(docker): publish one image at a time, newest wins
Two workflow_run publishes could overlap, and whichever finished last set
the tags, even if it built the older commit. A single concurrency group per
workflow with cancel-in-progress fixes that: ci already cancels superseded
runs on the branch, so publishes arrive in commit order and cancelling the
older one leaves the newest commit on the tags. Raised in review.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017s2w39tKNdBdD8kyfThuLy
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: sharevb <sharevb@gmail.com>
* perf(bundle): improve initial load + loading of tool
Render the sider once and only build the parts of it that are visible.
- App.vue renders BaseLayout around the layout switch instead of inside each
layout, so moving between a plain route and a tool route no longer unmounts
and rebuilds the whole sider (~460 menu items) on every navigation.
- CollapsibleToolMenu mounts a category's items the first time it opens. Every
category starts collapsed, so the menu was built entirely out of view.
- Its menuOptions computed no longer folds in the collapsed/active flags, which
rebuilt every category's tools array -- and re-rendered every item -- per route
change. They are read from the template instead.
- MenuItemTooltip measures truncation with scrollWidth/clientWidth rather than a
canvas measureText(), dropping a throwaway <canvas> and a getComputedStyle per
menu item.
Production build, 3 runs each, fresh profile per run:
first contentful paint 2476-2735ms -> 814-974ms
main-thread blocking 1806-2024ms -> 250-294ms
requests at boot 384 -> 208
click a tool from home 991-1014ms -> 178-197ms
switch between tools 281-322ms -> 74-125ms
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Fix small width in mermaid exporter
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: sharevb <sharevb@gmail.com>
Generates restic CLI commands, with the focus on getting data back out of a
repository when the Backrest UI is not available: a full restore, a restore
limited to some files or a subfolder, a single-file dump, or a FUSE mount.
Covers the backends Backrest points at (S3 compatible such as Backblaze B2,
B2 native, local, SFTP, REST, rclone, Azure, GCS, raw URI), builds the
matching environment setup without ever putting a secret in the command
(the default reads them with `read -rs`), and turns the Backrest plan and
instance IDs into the `plan:` / `created-by:` tag filters restic expects.
Also generates the whole recovery sequence (snapshots, find, ls, restore,
mount) from the same repository settings, and ships a small Backrest cheat
sheet pointing at the config file, the data directory and the tag formats.
Generator only: nothing is executed and no input leaves the browser.
* docs(cheatsheets): expand and align the chmod, git, docker and swarm memos
Unify the four cheat sheets on one layout: short intro, emoji section
headings, grouped command blocks with aligned inline comments, reference
tables and a resources section. Placeholders are consistently <angled>.
- chmod: ls -l breakdown, octal and symbolic tables, special bits, umask,
recursive/selective changes, recipes, related commands and gotchas;
fix the directory access matrix (r alone does not grant file access)
and the --preserve-root default
- git: config and aliases, staging, commit, branching, merge/rebase with
conflict flow, remotes, stashing, inspection, cherry-pick, tags, undo
with a reset-mode table, cleaning, bisect, submodules and worktrees
- docker: contexts and events, build flags, registries, run/exec/inspect,
volumes and mounts, networks, the full compose workflow, cleanup and
one-liners
- swarm: required firewall ports, node and manager operations, live
service updates, job modes, placement expressions, publish modes,
health checks, secret and config rotation, task states and a
troubleshooting table
* docs(cheatsheets): put descriptions above commands so each line copies clean
Trailing inline comments meant selecting a single command also picked up
the padding and its description. Move every description onto its own line
above the command it documents, keeping one code block per topic.
- each command now stands alone on its line: triple-click copies exactly
the command, nothing else
- no comment column to re-pad when a longer command is added later, so
adding a line no longer reindents the whole block
- code lines drop from a median of 78 columns to ~22 (p90 42), so blocks
no longer scroll sideways on narrow screens
- wrap the three remaining long commands over several lines
- reword the descriptions that only made sense trailing a command
* docs(cheatsheets): rework the tmux, screen, zellij, nano, jq, zpool, CSS and JSONPath memos
Bring eight more cheat sheets onto the same layout as the Docker and Git
ones: short intro, emoji section headings, one code block per topic with
the description above each command, reference tables, resources at the end.
- tmux: session/window/pane/copy-mode tables, scripting with send-keys and
capture-pane, a starting .tmux.conf
- screen: shared and detached attach modes, split regions, copy mode,
logging and monitoring, nested-screen prefix
- zellij: correct the pane-mode bindings (d/r split, not v/h), add tab,
resize, move, search and session modes, layouts, zellij run/edit/action
- nano: add the command-line options and .nanorc settings the sheet was
missing, drop the stray H1 and broken headings
- jq: flags, core syntax, object/array/string tables, conditionals,
variables, reduce, and runnable recipes; drop the stale AWS AMI note
and the HTML pipe entities
- zpool: vdev and support-vdev types, import/export, properties, dataset
and snapshot/replication commands, tuning notes
- CSS selectors: split one 60-row table into basic, combinator, attribute,
structural, state, form, functional and pseudo-element groups; add
:is()/:where()/:has() and a specificity table
- JSONPath: RFC 9535 functions, worked example document, filter operators
* docs(cheatsheets): rework the Dockerfile, Compose and kubectl memos
- Dockerfile: instruction reference table, BuildKit cache/secret/bind
mounts and heredocs, COPY --chown/--chmod/--from, HEALTHCHECK,
STOPSIGNAL, a CMD vs ENTRYPOINT table, build commands and a worked
multi-stage example
- Compose: drop the obsolete version: framing, merge the two duplicated
"Compose vs Swarm" sections into one table, correct the claim that
file-based secrets are Swarm-only, and add depends_on conditions,
profiles, watch mode, include/extends/anchors, env interpolation and
the full CLI section
- kubectl: replace the removed rolling-update and the retired Heapster
section, add contexts, custom-columns and JSONPath output, rollouts,
debug containers, port-forward, secrets, labels, node maintenance and
one-liners; tag the code blocks so they highlight
* docs(cheatsheets): rework the sed, regex and common-regex memos
- sed: how the pattern space works, an addressing table, the full command
reference including hold-space and branching, multi-line recipes, and a
warning about BSD/macOS -i; merge the duplicated deletion and addressing
sections
- regex: add flags, lazy quantifiers, named groups and backreferences,
Unicode property escapes, replacement tokens, the JavaScript methods
that expose groups, and a gotchas section (stateful /g, catastrophic
backtracking, escaping user input)
- common-regex: rewrite the patterns that markdown escaping had mangled
into unusable text, group them by subject, and add UUID, semver, CIDR,
MAC, ISO 8601, duration, log-line and CSV patterns
Every pattern in common-regex now compiles, and the ones people copy most
(IPv4, UUID, semver, E.164, ISO dates, password rules, slug, duration,
MAC) were checked against matching and non-matching input.
* docs(cheatsheets): rework the XPath, conventional-commits and RJ45 memos
- XPath: give every table a CSS-equivalent column, fix the broken
"only children of type" expression, flag which functions are 2.0+ and
give the 1.0 workarounds for ends-with and case folding, add the axes
short forms, worked examples, and how to run XPath from devtools,
xmllint, lxml, Selenium and Playwright
- conventional commits: types table with the release effect each one
has, description do/don't table, footer reference, both ways to mark a
breaking change, a version-bump table, and husky v9 hook syntax
- RJ45: keep the colour swatches and the pinout image, add what each pin
carries on 10/100 vs Gigabit, the PoE standards table (correcting the
claim that the blue pair is the PoE pair), gigabit crossover, Cat8,
length and solid-vs-stranded rules, and a fault-finding table
* docs(cheatsheets): rework the nginx and PowerShell memos
- nginx: the whole sheet was a single 218-line code block; split it into
sections with a service/CLI block, a file-layout table, location
matching priority, root vs alias, reverse proxy and WebSocket headers,
load-balancing methods, TLS, rate limiting, caching and gzip, a
variable reference and a 502/504 troubleshooting table
- PowerShell: add discovery (Get-Help/Get-Command/Get-Member), functions
and param blocks, try/catch and error preferences, Invoke-RestMethod
and JSON/CSV conversion, services, jobs, remoting, modules and
execution policy, PowerShell 7 operators, an alias table, and repair
the mangled escape-character rows
* docs(cheatsheets): rework the vim and bash memos
Both sheets were a single unbroken code block with ASCII banners, so the
whole page rendered as one <pre> with nothing to scan. Rebuild them as
sections with key/action tables and runnable blocks.
- vim: explain the count + operator + motion grammar, add the text-object
table (ciw, ci", da(), registers and why "0p exists, the :g and :v
global commands, folds, completion, diff mode, undo by time, a :set
reference and a starter vimrc
- bash: parameter expansion, arrays including associative ones, the test
operator tables, redirection and process substitution, job control and
traps, set -euo pipefail with its caveat, shellcheck, and an ANSI
colour table in place of sixty lines of colour variables
The vim sheet dropped roughly a hundred lines of one person's leader-key
mappings and plugin bindings (NERDTree, Taglist, sparkup, PHP DOC), which
only worked with their dotfiles; a note now explains that leader mappings
come from your own vimrc.