detached 497fca5

fix: resolve TypeScript errors for CI

- Fix Uint8Array type in password.ts for Node 22 compatibility
- Add missing TextStyle import in security-tests.ts
- Update Zod 4 API: .errors -> .issues in login handler
commit
497fca5a15e80883a1e6cf43909fa9121459b037
author
Kit · · 2025-12-15 06:36 UTC
parent
2d69752
signature
SSH UnverifiedSHA256:3RGv7q1rcg0JUU2CjMAhwZcyGvcCDmFuxQQT8Z18wLA · arch-ssh This key is not trusted for the committer email
3 files · +3 -3
M src/lib/utils/password.ts +1 -1
@@ -43,7 +43,7 @@ async function derivePasswordHash(password: string, salt: Uint8Array): Promise<s
4343 const derivedBits = await crypto.subtle.deriveBits(
4444 {
4545 name: "PBKDF2",
46- salt: salt,
46+ salt: salt.buffer as ArrayBuffer,
4747 iterations: 100000,
4848 hash: "SHA-512"
4949 },
@@ -43,7 +43,7 @@ async function derivePasswordHash(password: string, salt: Uint8Array): Promise<s
43 const derivedBits = await crypto.subtle.deriveBits(43 const derivedBits = await crypto.subtle.deriveBits(
44 {44 {
45 name: "PBKDF2",45 name: "PBKDF2",
46- salt: salt,46+ salt: salt.buffer as ArrayBuffer,
47 iterations: 100000,47 iterations: 100000,
48 hash: "SHA-512"48 hash: "SHA-512"
49 },49 },
M src/lib/utils/security-tests.ts +1 -1
@@ -1,5 +1,5 @@
11 import { formatText, validateMessageContent, createGradientText } from './text-formatter';
2-import { validateTextStyle, DEFAULT_TEXT_STYLE } from '../types/text-formatting';
2+import { validateTextStyle, DEFAULT_TEXT_STYLE, type TextStyle } from '../types/text-formatting';
33
44 // XSS Test Vectors
55 const XSS_TEST_VECTORS = [
@@ -1,5 +1,5 @@
1 import { formatText, validateMessageContent, createGradientText } from './text-formatter';1 import { formatText, validateMessageContent, createGradientText } from './text-formatter';
2-import { validateTextStyle, DEFAULT_TEXT_STYLE } from '../types/text-formatting';2+import { validateTextStyle, DEFAULT_TEXT_STYLE, type TextStyle } from '../types/text-formatting';
3 3
4 // XSS Test Vectors4 // XSS Test Vectors
5 const XSS_TEST_VECTORS = [5 const XSS_TEST_VECTORS = [
M src/routes/api/session/login/+server.ts +1 -1
@@ -74,7 +74,7 @@ export const POST: RequestHandler = async ({ request, cookies }) => {
7474 loginSchema.parse({ username, password });
7575 } catch (err) {
7676 const zodError = err as z.ZodError;
77- const errorMessage = zodError.errors?.[0]?.message || 'Invalid input data';
77+ const errorMessage = zodError.issues?.[0]?.message || 'Invalid input data';
7878 log.warn('Login validation failed', { error: errorMessage });
7979 return new Response(
8080 JSON.stringify({ error: errorMessage } as LoginResponseError),
@@ -74,7 +74,7 @@ export const POST: RequestHandler = async ({ request, cookies }) => {
74 loginSchema.parse({ username, password });74 loginSchema.parse({ username, password });
75 } catch (err) {75 } catch (err) {
76 const zodError = err as z.ZodError;76 const zodError = err as z.ZodError;
77- const errorMessage = zodError.errors?.[0]?.message || 'Invalid input data';77+ const errorMessage = zodError.issues?.[0]?.message || 'Invalid input data';
78 log.warn('Login validation failed', { error: errorMessage });78 log.warn('Login validation failed', { error: errorMessage });
79 return new Response(79 return new Response(
80 JSON.stringify({ error: errorMessage } as LoginResponseError),80 JSON.stringify({ error: errorMessage } as LoginResponseError),

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 3

Tags 8

↑↓ moveenter openesc close