Files
windmill/frontend/src/lib/utils/serializeParam.ts
T
Ruben FiszelandClaude Opus 5 e651b4cd63 perf: lazy-load the low-code runtime on public app pages (#11087)
* perf: lazy-load the low-code runtime on public app pages

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018bSzETfUb23CRRMEJdwqeS

* perf: fetch the low-code runtime alongside the app payload

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018bSzETfUb23CRRMEJdwqeS

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 11:14:09 +00:00

13 lines
653 B
TypeScript

// A leaf on purpose. navigation.ts (loaded by nearly every page) must not pull in zod
// through svelte5UtilsKit, and svelte5UtilsKit must not import navigation.ts: the
// sharedUtils declaration build type-checks it via utils.ts -> stores.ts ->
// dbManagerDrawerModel, where $app/* does not resolve.
/** Serialize a value to a URL search param string. Primitives are written as-is; anything else is JSON. */
export function serializeParam(value: unknown): string {
if (typeof value === 'string') return value
if (typeof value === 'number') return String(value)
if (typeof value === 'boolean') return String(value)
return JSON.stringify(value)
}