Commit Graph
37 Commits
Author SHA1 Message Date
ShareVB bc44870665 chore: global code formatting 2026-09-06 09:02:45 +02:00
SebastianandClaude Opus 5 5e4972e285 chore(deps): replace the five deprecated packages from the dependency dashboard (#557)
* test: extract testable services and pin current crypto behaviour

Move the hashing, hmac, crc and ULA logic out of the single file components
into service modules next to them, and cover them with characterization tests
that pin the exact digests, encodings and ciphertexts the tools produce today.

The encryption tool had no tests at all; it now has round trip coverage for
every algorithm plus pinned ciphertexts for the deterministic ones, including
OpenSSL salted payloads produced by previous versions of it-tools.

No behaviour change: this is the reference point the dependency replacements
that follow have to reproduce exactly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq

* chore(deps): replace the five deprecated packages flagged by renovate

Renovate's dependency dashboard lists five deprecated or replaced packages;
this removes all of them, keeping the observable behaviour identical.

- crypto-js -> crypto-es. Upstream discontinued crypto-js; crypto-es is its
  maintained ESM/TypeScript successor and is byte for byte compatible, which
  the characterization tests added in the previous commit verify: the same
  1012 assertions pass before and after the swap, including the OpenSSL
  salted ciphertexts of the encryption tool. It ships its own types, so
  @types/crypto-js goes away too.
- plausible-tracker -> @plausible-analytics/tracker, the official replacement.
  The app keeps providing the same 'plausible' injection shape, so nothing
  downstream changes. apiHost maps onto the new endpoint option and keeps
  posting to the very same url, trackLocalhost onto captureOnLocalhost, and
  the pageviews that enableAutoPageviews() used to start are now captured by
  init() itself. init() throws without a domain, unlike the old tracker, so
  an enabled but domain-less config now falls back to the no-op instance
  instead of breaking the app bootstrap.
- svg2png-wasm -> @resvg/resvg-wasm, the replacement named in its deprecation
  notice. The renderer moves into a service covered by tests that rasterize
  real svg content, and the 2 MB binary no longer has to be committed under
  public/: vite emits it from the package as a hashed asset, so it can never
  drift from the js glue on upgrade.
- @types/bcryptjs and @types/uuid are deprecated stubs, bcryptjs and uuid
  having shipped their own types for a while.

Also drops the now dead renovate rules that only existed to keep uuid and
@types/uuid in lockstep, and fixes the tool metadata a new guard test caught:
the encryption tool advertised 'crypto-s' and the wysiwyg editor still
advertised monaco and prettier.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq

* test: pin that svg text is actually drawn, document the load bearing empty iv

The resvg swap is pixel identical to svg2png-wasm for shapes and gradients,
and it also fixes text that names the embedded Roboto family: svg2png-wasm
returned an empty canvas there, so the assertion guards a real improvement
rather than only the image dimensions.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq

* fix: address review feedback on the plugin and renderer initialization

Two of the review comments are real regressions against the behaviour the
replaced packages had, so both are fixed with a test that fails without the fix:

- The plausible plugin called init() on every install. init() throws on the
  second call, so installing the plugin on a second app instance (tests, hot
  reload) would have taken the app down, where the old tracker was happy to be
  constructed repeatedly. The tracker is now initialized once and reused. The
  api host also gets its trailing slash trimmed so the endpoint cannot end up
  with a double slash.
- initializeSvgRenderer() memoized the initialization promise including its
  rejections, so one failed wasm download left the tool broken until a page
  reload. The old code only latched its flag after a successful load. A failed
  attempt is no longer cached.

Also extends the tool metadata guard to the removed stub type packages, and
pins the negative counters that verifyHOTP walks through when the window is
wider than the counter: their hexadecimal form keeps the minus sign, which the
hex parser reads as ffffffff rather than rejecting, and crypto-es reproduces
that exactly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-15 21:52:48 +02:00
SebastianandClaude Fable 5 bad27cfe39 perf: overhaul startup performance, dependencies and UI responsiveness (#419)
* perf(i18n): bundle only English eagerly, lazy-load other locales on demand

The entry bundle previously inlined all 19 locales (11 MB minified, 2.4 MB
gzip) via the virtual @intlify messages module. Now only en (plus tool-level
en files) is compiled into the entry; every other locale becomes its own lazy
chunk fetched the first time it is selected, with vue-i18n falling back to
English until the messages arrive.

VITE_AVAILABLE_LOCALES now filters the locales offered at runtime instead of
trimming the build; unlisted locale chunks are emitted but never fetched.

Also adds shims for *.yml default imports and @tabler/icons-vue per-icon
deep imports (used by the follow-up icon-loading commit).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

* perf(tools): load tool icons lazily and parallelize boot config fetches

The eager tool-metadata glob pulled ~460 static icon component modules into
the entry graph. Tool definitions now reference their icon via
defineAsyncComponent + per-icon dynamic import, and an advancedChunks group
merges all of them into a single lazy 'tool-icons' chunk fetched off the
critical path when the menu/home first renders. Exact same glyphs as before.

Entry-graph components (navbar, layouts, ToolCard, copy buttons, command
palette, home) switch from runtime icon packages to build-time-inlined
~icons/tabler imports so no static reference drags the icon chunk into the
entry bundle.

src/tools/index.ts also fetched tools-filter.json and external-tools.json
sequentially under top-level await, blocking first render on two serial
round-trips; they are now fetched in parallel.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

* perf(pwa): precache only the app shell, cache chunks and wasm on demand

The service worker precached every JS chunk and WASM binary — 1,679 files,
~162 MB — on first visit, saturating bandwidth while the page was trying to
become interactive. Precache is now limited to the shell (css/html) with
CacheFirst runtime caching for same-origin hashed scripts, workers and wasm,
so offline support covers everything the user has actually opened.

VITE_PWA_FULL_PRECACHE=true restores the previous cache-everything behavior
for self-hosted full-offline deployments.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

* perf(menu): eliminate layout thrash in sider and category animations

The sider show/hide animates CSS width, which re-laid-out all ~460 menu
items plus the page content on every frame; category expand/collapse
animates grid-template-rows with the same cost. Two changes cut the
per-frame work:

- content-visibility: auto on each category container so offscreen
  categories skip layout and paint entirely during animations
- the sider scroll content is pinned to the expanded width, so the width
  transition clips the menu instead of re-wrapping every item per frame

Measured with the Long Animation Frames API (dev mode, full hide+show
cycle): 4 long frames totalling ~395 ms before, 2 totalling ~236 ms after;
animation frames after the initial commit now stay under 50 ms.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

* perf(deps): replace moment with date-fns in countdown and alarm tools

moment was only used by three tools, each pulling its ~70 KB gzip bundle
into their chunks while date-fns (already a dependency) covers the same
needs tree-shaken. Also fixes a latent bug: moment's mutating add()/set()
modified the shared 'now' ref on every computed evaluation, so the deadline
could drift by one duration per re-render; date-fns operations are
immutable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

* perf(deps): replace lodash with es-toolkit

Full CJS lodash (~70 KB gzip, no tree-shaking) was in the entry graph via
the tools store and shared composables, plus four lodash.* micro-packages.
es-toolkit provides the same functions as tree-shakeable ESM:

- import _ from 'lodash' -> import * as _ from 'es-toolkit/compat'
  (namespace member access tree-shakes under Rolldown)
- the 20 _.chain pipelines are rewritten as plain array/object operations
  or es-toolkit calls (es-toolkit has no chain, deliberately)
- lodash.defaultsdeep/flattendeep/last/mergewith micro-packages replaced
  with es-toolkit core/compat equivalents
- lodash's RecursiveArray type is declared locally in generate-tree.ts
- files whose only lodash use was inside a rewritten chain lose the
  dependency entirely

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

* fix: catch lodash usages the codemod missed (.js/.tsx files, bare _() wrapper)

outputFormatter.js and diff-viewer.models.tsx were outside the codemod's
*.ts/*.vue glob, and otp.service.ts used the implicit-chain _(...) wrapper
form that the _. usage regex didn't match (its import was wrongly removed).
Both builds still passed because pnpm's hoisted store made 'lodash'
resolvable even after removal from package.json.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

* perf(boot): drop the splash screen and parallelize the settings fetch

The splash screen existed to cover a multi-second blank period while the old
13 MB entry bundle parsed; with the startup payload at ~3 MB the app shell
paints fast enough to render directly (measurements in the PR description).
Removes vite-plugin-splash-screen entirely.

tools-settings.json was fetched under top-level await in main.ts, serially
after the config fetches in src/tools/index.ts. It now lives in a sibling
async module so all three optional config fetches share one round-trip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

* fix: defer preload-error reload so it cannot abort an in-flight navigation

Firefox fires vite:preloadError for module preloads cancelled by a user
navigation (NS_BINDING_ABORTED), and the immediate location.reload() raced
and aborted that navigation. With the tool icons now loading via dynamic
imports there are ~460 preloads in flight at startup, which made the race
deterministic in the date-time-converter Playwright specs on firefox.

Deferring the reload by a tick resolves it: if the page is genuinely
navigating away its timers die with the document; on a real chunk-load
failure the reload still happens.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

* fix(types): satisfy the vitest tsconfig typecheck

pnpm typecheck runs vue-tsc against tsconfig.vitest.json, which lacks the
unplugin-vue-i18n type shim and infers stricter unions:

- tools/index.ts: type the fetch fallbacks so Promise.all doesn't widen
  filterConfig to 'ToolsFilter | {}'
- i18n.plugin.ts: collapse es-toolkit merge's recursive mapped type before
  it reaches vue-i18n's generics (TS2589), watch the locale through the
  getter, and cast the messages record
- generate-tree.ts: drop flattenDeep/RecursiveArray for a plain spread —
  child output is already joined strings, so there was only one level to
  flatten

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

* perf(bundle): cut startup payload from ~1 MB to ~560 KB gzip

Four eager-loading leaks accounted for almost half the startup JS:

- Font Awesome (298 KB gzip): main.ts registered the entire solid icon set
  via library.add(fas) although only the pomodoro timer uses it. The six
  icons it needs are now registered inside the tool's lazy chunk.
- tool-icons chunk (67 KB gzip): rolldown's advancedChunks defaults to
  includeDependenciesRecursively, which captured shared helpers into the
  icon chunk and made entry chunks statically depend on it, dragging the
  whole lazy icon set back into the startup payload. Disabled per-group.
- markdown-it + entities + dompurify (~50 KB gzip): eagerly reachable via
  three paths — the external-tools mapping in tools/index.ts (now a
  conditional dynamic import), vue-markdown-render in tool.layout.vue and
  Home.custom.vue (now defineAsyncComponent).
- demo gallery routes: registered behind a runtime env check the bundler
  cannot eliminate; now a conditional dynamic import gated on
  import.meta.env.DEV so production builds drop it entirely.

Startup JS: 3.2 MB -> 1.92 MB raw, ~1.05 MB -> 562 KB gzip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

* fix(lint): drop redundant spread flagged by oxlint

Object.values already returns a fresh array, so it can be pushed into
directly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 22:46:19 +02:00
lionel-roweandShareVB 102cfce37b Use async versions of bcrypt methods to avoid freezing browser tab (#204)
* Use async versions of bcrypt methods to avoid freezing browser tab

* Update bcryptjs to 3.0.3 and remove setInterval workaround

* extract tools strings enhancements

* i18n plugin optimization
---------

Co-authored-by: ShareVB <sharevb@gmail.com>
2025-11-13 00:55:29 +01:00
sharevb a8c6ebc81b Feat/translate all content (#121)
* feat: add script to extract strings

* feat: extract many strings (html, attr, label)

* feat(extract string): extract html only for .vue and single file mode

* fix: __i18n_ally_root__

* feat: nestify en.yml + extract tab attributes

* feat: add script to extract strings

* feat: extract many strings (html, attr, label)

* feat(extract string): extract html only for .vue and single file mode

* fix: __i18n_ally_root__

* feat: nestify en.yml + extract tab attributes

* fix: lint

* feat: add vue-i18n-extract to check missing keys

* fix: unit tests

* fix: update vue i18n plugin
2025-07-20 21:01:01 +02:00
黄家祥 a1022a947d feature: Supports reading language from environment variables, which makes it easy to modify the language after packaging into a Docker image 2024-07-17 16:59:40 +08:00
Corentin THOMASSET dc0461595f feat(i18n): get locales on build (#880) 2024-02-11 00:33:52 +01:00
莫颓 ebb4ec4165 feat(i18n): support for i18n in .ts files (#683)
(cherry picked from commit 732313bfc32a514ef064ca0f90304ff05e2e7ef3)
2023-10-22 10:23:00 +02:00
Corentin THOMASSET 233d5565f6 refactor(i18n): merge tools scoped locales with global ones (#612) 2023-09-03 20:07:45 +00:00
Corentin THOMASSET 1b038c7826 chore(i18n): tool scoped locales (#471) 2023-06-19 21:14:44 +00:00
Corentin Thomasset ebfb872fae chore(i18n): setup i18n plugin config 2023-06-18 14:33:58 +02:00
Corentin Thomasset 33c9b6643f chore(lint): switched to a better lint config 2023-05-28 23:29:14 +02:00
Corentin Thomasset 4ccd73c2d1 feat(dx): auto resolve vue components 2023-04-06 19:08:28 +02:00
Corentin Thomasset aa4dc0418e feat(plausible): disable plausible instance for self hosted instance 2023-04-04 19:01:59 +02:00
bastantoine acc7f0a586 feat(new-tool): jwt parser (#262)
* npm install jwt-decode

* added base tool structure

* added function to decode JWT and display header and payload

* use a table to display the data

* show human readable values

* added switch to toggle display of parsed values

* lint

* replaced basic package-lock.json with pnpm-lock.json

* change the icon of the tool

* simplify return

* use camelCase

* added description of the tool

* always parse the values

* use camelCase...
2022-12-27 09:38:35 +01:00
Corentin Thomasset def60e7248 refactor(tracker): better tracker injection 2022-12-21 21:02:57 +01:00
Corentin Thomasset bfc2e24bbf feat(tracker): added actions monitoring 2022-12-21 00:03:31 +01:00
Corentin Thomasset 35b5187119 feat(new-tool): chmod calculator 2022-11-23 21:57:38 +01:00
Corentin Thomasset 164e32b442 feat(new-tool): meta tag generator 2022-08-19 17:40:00 +02:00
Corentin Thomasset 125a50215a feat(new-tool): added an ETA calculator 2022-07-24 18:32:05 +02:00
Corentin Thomasset 6becdbb423 refactor(config): added config management with figue 2022-05-24 00:07:54 +02:00
Corentin Thomasset d356b1488f feat(new-tool): json viewer 2022-05-09 17:41:42 +02:00
Corentin Thomasset 086d31eab5 refactor(lint): linter auto fix 2022-04-22 23:31:40 +02:00
Corentin Thomasset 0808920951 feat: added plausible tracker 2022-04-16 11:51:20 +02:00
Corentin Thomasset 1d09a01bb2 refactor(style): cleaner layout 2022-04-14 22:41:51 +02:00
Corentin Thomasset 483cf66db9 refactor(style): menu scrollbar 2022-04-14 18:45:47 +02:00
Corentin Thomasset 5582d75927 feat(tool): qr-code generator 2022-04-14 18:18:15 +02:00
Corentin Thomasset 203b6a9d73 feat(tool): base64 string converter 2022-04-14 02:30:25 +02:00
Corentin Thomasset 358ff45ae1 feat(tool): crontab generator 2022-04-14 02:02:05 +02:00
Corentin Thomasset 0a7c3252e3 feat(tool): text statistics 2022-04-14 01:06:06 +02:00
Corentin Thomasset 5cd9997a84 feat(tool): git memo 2022-04-12 13:24:14 +02:00
Corentin Thomasset 2d9cb209b3 feat(tool): date-time converter 2022-04-12 01:43:49 +02:00
Corentin Thomasset d55329f3ab feat(tool): bip39-generator 2022-04-11 22:47:05 +02:00
Corentin Thomasset 57fd14a199 feat(page): home page layout 2022-04-06 00:42:24 +02:00
Corentin Thomasset 3db4f91c27 feat(page): added 404 page 2022-04-05 17:40:35 +02:00
Corentin Thomasset 25a8659786 chore: components base 2022-04-04 00:24:45 +02:00
Corentin Thomasset 64c92a661c chore: first commit 2022-03-31 00:33:29 +02:00