Tags: perber/leafwiki
Tags
fix(build): check APP_VERSION env var before shelling out in resolveA… …ppVersion (#1432) 4be3337 moved the APP_VERSION env-var check out of vite.config.ts and into scripts/resolve-version.sh, unconditionally shelling out to it via execSync. That breaks in the Docker frontend-build stage: it only COPYs ui/leafwiki-ui/, so scripts/resolve-version.sh isn't present there, and node:*-alpine doesn't have bash installed to run it even if it were. execSync throws, and the catch silently falls back to the hardcoded 'v0.1.0' string — confirmed in the published v0.12.1 image's JS bundle (`version:`v0.1.0`` instead of the real tag), even though APP_VERSION was already being passed to `npm run build` correctly. Restores the env-var-first check (mirroring the script's own priority order) so the Docker/release path — which always sets APP_VERSION via --build-arg — no longer depends on the script or a shell being reachable at all; the script invocation remains as the local `npm run build`/`npm run dev` fallback. Adds vite.config.test.ts (new: resolveAppVersion wasn't exported/testable before) mocking execSync to always throw, asserting APP_VERSION still wins. Note: running this repo's Vitest suite locally needs Node >=22 - Node 20.19 fails to load jsdom entirely (unrelated undici/jsdom version mismatch).
feat(restore): add restore-from-uploaded-ZIP and fix Windows users.db… ( #1341) Adds POST /restore/upload with a configurable max size (--restore-upload-max-size / LEAFWIKI_RESTORE_UPLOAD_MAX_SIZE) so a backup ZIP can be restored without CLI access. Also replaces the previous best-effort Windows warning with an actual fix: AuthService now suspends the UserStore's DB connection before a live restore renames users.db, avoiding a sharing-violation race on Windows.
fix(editor): convert tables without <th> cells during rich paste (#1286) turndown-plugin-gfm only recognizes a table's header row when its cells are literal <th> elements, and otherwise keeps the whole table as raw, unconverted HTML. Many real paste sources (Google Sheets, plain web tables, Excel-to-HTML) render every cell as <td>, so their tables were silently dropped as raw HTML instead of becoming markdown. Also wires rich paste behind Ctrl/Cmd+Shift+V instead of plain paste while it's being tested, and moves pasteRich/pastePlain out of the imperative handle into MarkdownEditor callbacks passed down to the CodeMirror keymap.
fix: ignore bash [[ ]] conditionals and disable single-dollar math (#… …1203) Wiki-link regex now requires a non-whitespace first character after [[, which prevents bash-style conditionals (e.g. [[ -n "$var" ]]) from being matched as wiki-links in both the Go backend and the TS preprocessor. Disables singleDollarTextMath in remarkMath to avoid conflicts between $var in bash prose and math delimiters; use $$...$$ for math blocks.
chore: bump github.com/quic-go/quic-go from 0.59.0 to 0.59.1 (#1117) Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go) from 0.59.0 to 0.59.1. - [Release notes](https://github.com/quic-go/quic-go/releases) - [Commits](quic-go/quic-go@v0.59.0...v0.59.1) --- updated-dependencies: - dependency-name: github.com/quic-go/quic-go dependency-version: 0.59.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fix(auth): refresh before token expiry (#1042) Return access token expiry metadata from login and refresh responses so the frontend can refresh proactively before protected requests. This reduces visible 401 responses for expiring sessions while keeping the existing refresh-on-401 fallback in place. Document the access token expiry unit in the session store and avoid redundant session clearing after logout-backed cleanup.
PreviousNext