litestar-vite-plugin 0.23.4 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@ Litestar Vite connects the Litestar backend to a Vite toolchain. It supports SPA
4
4
 
5
5
  ## Features
6
6
 
7
- - One-port dev: proxies Vite HTTP + WS/HMR through Litestar by default; switch to two-port with `VITE_PROXY_MODE=direct`.
7
+ - One-port dev: proxies Vite HTTP + WS/HMR through Litestar on a single ASGI port by default.
8
8
  - Framework-mode support: use `mode="framework"` (alias `mode="ssr"`) for Astro, Nuxt, and SvelteKit. Litestar proxies everything except your API routes.
9
9
  - Production assets: reads the Vite manifest from `public/manifest.json` (configurable) and serves under `asset_url`.
10
10
  - Type-safe frontends: optional OpenAPI/routes export plus `@hey-api/openapi-ts` via the Vite plugin.
@@ -1,124 +1,161 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en" class="dark">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Litestar Vite Dev Server</title>
7
- <link rel="preconnect" href="https://fonts.googleapis.com">
8
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap">
10
- <style rel="stylesheet" crossorigin>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
7
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" />
10
+ <style rel="stylesheet" crossorigin>/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
11
11
  @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}@layer theme{:root,:host{--font-sans:"Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--font-mono:"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;--spacing:.25rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-light:300;--font-weight-medium:500;--font-weight-semibold:600;--tracking-widest:.1em;--leading-relaxed:1.625;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-navy:#202235;--color-navy-surface:#2a2d40;--color-navy-surface-variant:#1a1c2e;--color-gold:#edb641;--color-gold-light:#ffd480;--color-on-surface:#f8fafc;--color-on-surface-muted:#cbd5e1;--color-on-surface-subtle:#94a3b8;--color-outline:#334155;--color-success:#4ade80;--radius-brand:8px;--radius-brand-lg:12px;--shadow-text-glow-dark:0 0 24px #edb64138}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.mt-8{margin-top:calc(var(--spacing) * 8)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.mb-12{margin-bottom:calc(var(--spacing) * 12)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.inline{display:inline}.inline-flex{display:inline-flex}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-auto{width:auto}.w-full{width:100%}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:calc(var(--spacing) * 0)}.flex-1{flex:1}.flex-none{flex:none}.animate-pulse-dot{animation:2s ease-in-out infinite pulse-dot}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}.rounded-brand{border-radius:var(--radius-brand)}.rounded-brand-lg{border-radius:var(--radius-brand-lg)}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-\[3px\]{border-left-style:var(--tw-border-style);border-left-width:3px}.border-outline{border-color:var(--color-outline)}.border-l-gold{border-left-color:var(--color-gold)}.bg-navy-surface{background-color:var(--color-navy-surface)}.bg-navy-surface-variant{background-color:var(--color-navy-surface-variant)}.bg-success{background-color:var(--color-success)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-16{padding-block:calc(var(--spacing) * 16)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-all{word-break:break-all}.text-gold{color:var(--color-gold)}.text-on-surface{color:var(--color-on-surface)}.text-on-surface-muted{color:var(--color-on-surface-muted)}.text-on-surface-subtle{color:var(--color-on-surface-subtle)}.uppercase{text-transform:uppercase}.opacity-60{opacity:.6}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.select-all{-webkit-user-select:all;user-select:all}.text-brand-glow{text-shadow:var(--shadow-text-glow-dark)}@media (hover:hover){.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\:bg-navy:hover{background-color:var(--color-navy)}.hover\:text-gold:hover{color:var(--color-gold)}.hover\:text-gold-light:hover{color:var(--color-gold-light)}.hover\:opacity-80:hover{opacity:.8}}@media (width>=40rem){.sm\:px-10{padding-inline:calc(var(--spacing) * 10)}.sm\:py-10{padding-block:calc(var(--spacing) * 10)}.sm\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}}}html{font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{background-color:var(--color-navy);color:var(--color-on-surface-muted);background-image:radial-gradient(#f8fafc0a 1px,#0000 1px);background-size:24px 24px}@keyframes pulse-dot{0%,to{opacity:1;transform:scale(1)}50%{opacity:.55;transform:scale(.92)}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}
12
12
  /*$vite$:1*/</style>
13
- </head>
14
- <body class="min-h-screen flex items-center justify-center px-6 py-16">
15
-
13
+ </head>
14
+ <body class="flex min-h-screen items-center justify-center px-6 py-16">
16
15
  <main class="w-full max-w-lg">
16
+ <!-- Brand hero: signature display-lg treatment per DESIGN.md -->
17
+ <header class="mb-12 text-center">
18
+ <div class="mb-10 flex items-center justify-center gap-6">
19
+ <a href="https://litestar.dev" target="_blank" rel="noreferrer" class="block transition-opacity duration-200 hover:opacity-80" aria-label="Litestar">
20
+ <svg viewBox="0 52 410 250" xmlns="http://www.w3.org/2000/svg" class="h-14 w-auto">
21
+ <defs>
22
+ <clipPath id="9eb7762d41">
23
+ <path d="M 15.933594 105 L 328 105 L 328 259 L 15.933594 259 Z M 15.933594 105 " clip-rule="nonzero" />
24
+ </clipPath>
25
+ <clipPath id="183d3cc178">
26
+ <path d="M 142 78.769531 L 359.433594 78.769531 L 359.433594 296.269531 L 142 296.269531 Z M 142 78.769531 " clip-rule="nonzero" />
27
+ </clipPath>
28
+ </defs>
29
+ <g clip-path="url(#9eb7762d41)">
30
+ <path
31
+ fill="#edb641"
32
+ d="M 147.625 240.3125 C 161.5 233.984375 173.554688 227.011719 183.425781 220.550781 C 202.304688 208.203125 226.4375 185.242188 227.761719 183.410156 L 218.917969 177.503906 L 211.257812 172.386719 L 235.503906 171.441406 L 243.296875 171.136719 L 245.414062 163.640625 L 252.007812 140.304688 L 260.402344 163.054688 L 263.097656 170.363281 L 270.890625 170.058594 L 295.136719 169.113281 L 276.078125 184.117188 L 269.953125 188.9375 L 272.652344 196.25 L 281.046875 218.996094 L 260.871094 205.523438 L 254.390625 201.195312 L 248.265625 206.015625 L 229.207031 221.023438 L 232.480469 209.425781 L 235.796875 197.691406 L 236.207031 196.234375 C 213.003906 213.585938 180.546875 230.304688 161.140625 236.488281 C 156.6875 237.90625 152.183594 239.179688 147.625 240.3125 Z M 101.992188 258.078125 C 136.382812 256.734375 177.355469 248 217.675781 222.363281 L 209.90625 249.867188 L 254.910156 214.4375 L 302.539062 246.246094 L 282.71875 192.539062 L 327.71875 157.109375 L 270.46875 159.34375 L 250.648438 105.636719 L 235.085938 160.726562 L 177.835938 162.964844 L 210.980469 185.097656 C 189.164062 204.921875 134.445312 247.195312 61.957031 250.03125 C 47.300781 250.601562 31.914062 249.558594 15.933594 246.394531 C 15.933594 246.394531 52.011719 260.035156 101.992188 258.078125 "
33
+ fill-opacity="1"
34
+ fill-rule="nonzero"
35
+ />
36
+ </g>
37
+ <g clip-path="url(#183d3cc178)">
38
+ <path
39
+ fill="#edb641"
40
+ d="M 250.789062 78.96875 C 190.78125 78.96875 142.140625 127.570312 142.140625 187.519531 C 142.140625 198.875 143.886719 209.816406 147.121094 220.101562 C 151.847656 217.75 156.363281 215.316406 160.660156 212.84375 C 158.394531 204.789062 157.183594 196.296875 157.183594 187.519531 C 157.183594 135.871094 199.089844 93.996094 250.789062 93.996094 C 302.484375 93.996094 344.390625 135.871094 344.390625 187.519531 C 344.390625 239.171875 302.484375 281.042969 250.789062 281.042969 C 222.75 281.042969 197.597656 268.722656 180.441406 249.210938 C 175.453125 251.152344 170.402344 252.917969 165.289062 254.511719 C 185.183594 279.816406 216.082031 296.070312 250.789062 296.070312 C 310.792969 296.070312 359.433594 247.472656 359.433594 187.519531 C 359.433594 127.570312 310.792969 78.96875 250.789062 78.96875 "
41
+ fill-opacity="1"
42
+ fill-rule="nonzero"
43
+ />
44
+ </g>
45
+ <path
46
+ fill="#edb641"
47
+ d="M 92.292969 173.023438 L 98.289062 191.460938 L 117.691406 191.460938 L 101.992188 202.855469 L 107.988281 221.292969 L 92.292969 209.898438 L 76.59375 221.292969 L 82.589844 202.855469 L 66.894531 191.460938 L 86.296875 191.460938 L 92.292969 173.023438 "
48
+ fill-opacity="1"
49
+ fill-rule="nonzero"
50
+ />
51
+ <path
52
+ fill="#edb641"
53
+ d="M 120.214844 112.25 L 125.390625 128.167969 L 142.140625 128.167969 L 128.589844 138 L 133.765625 153.917969 L 120.214844 144.082031 L 106.664062 153.917969 L 111.839844 138 L 98.289062 128.167969 L 115.039062 128.167969 L 120.214844 112.25 "
54
+ fill-opacity="1"
55
+ fill-rule="nonzero"
56
+ />
57
+ <path
58
+ fill="#edb641"
59
+ d="M 34.695312 209.136719 L 37.71875 218.421875 L 47.492188 218.421875 L 39.585938 224.160156 L 42.605469 233.449219 L 34.695312 227.707031 L 26.792969 233.449219 L 29.8125 224.160156 L 21.90625 218.421875 L 31.679688 218.421875 L 34.695312 209.136719 "
60
+ fill-opacity="1"
61
+ fill-rule="nonzero"
62
+ />
63
+ </svg>
64
+ </a>
17
65
 
18
- <!-- Brand hero: signature display-lg treatment per DESIGN.md -->
19
- <header class="text-center mb-12">
20
- <div class="flex items-center justify-center gap-6 mb-10">
21
- <a href="https://litestar.dev" target="_blank" rel="noreferrer" class="block transition-opacity duration-200 hover:opacity-80" aria-label="Litestar">
22
- <svg viewBox="0 52 410 250" xmlns="http://www.w3.org/2000/svg" class="h-14 w-auto">
23
- <defs>
24
- <clipPath id="9eb7762d41">
25
- <path d="M 15.933594 105 L 328 105 L 328 259 L 15.933594 259 Z M 15.933594 105 " clip-rule="nonzero"/>
26
- </clipPath>
27
- <clipPath id="183d3cc178">
28
- <path d="M 142 78.769531 L 359.433594 78.769531 L 359.433594 296.269531 L 142 296.269531 Z M 142 78.769531 " clip-rule="nonzero"/>
29
- </clipPath>
30
- </defs>
31
- <g clip-path="url(#9eb7762d41)">
32
- <path fill="#edb641" d="M 147.625 240.3125 C 161.5 233.984375 173.554688 227.011719 183.425781 220.550781 C 202.304688 208.203125 226.4375 185.242188 227.761719 183.410156 L 218.917969 177.503906 L 211.257812 172.386719 L 235.503906 171.441406 L 243.296875 171.136719 L 245.414062 163.640625 L 252.007812 140.304688 L 260.402344 163.054688 L 263.097656 170.363281 L 270.890625 170.058594 L 295.136719 169.113281 L 276.078125 184.117188 L 269.953125 188.9375 L 272.652344 196.25 L 281.046875 218.996094 L 260.871094 205.523438 L 254.390625 201.195312 L 248.265625 206.015625 L 229.207031 221.023438 L 232.480469 209.425781 L 235.796875 197.691406 L 236.207031 196.234375 C 213.003906 213.585938 180.546875 230.304688 161.140625 236.488281 C 156.6875 237.90625 152.183594 239.179688 147.625 240.3125 Z M 101.992188 258.078125 C 136.382812 256.734375 177.355469 248 217.675781 222.363281 L 209.90625 249.867188 L 254.910156 214.4375 L 302.539062 246.246094 L 282.71875 192.539062 L 327.71875 157.109375 L 270.46875 159.34375 L 250.648438 105.636719 L 235.085938 160.726562 L 177.835938 162.964844 L 210.980469 185.097656 C 189.164062 204.921875 134.445312 247.195312 61.957031 250.03125 C 47.300781 250.601562 31.914062 249.558594 15.933594 246.394531 C 15.933594 246.394531 52.011719 260.035156 101.992188 258.078125 " fill-opacity="1" fill-rule="nonzero"/>
33
- </g>
34
- <g clip-path="url(#183d3cc178)">
35
- <path fill="#edb641" d="M 250.789062 78.96875 C 190.78125 78.96875 142.140625 127.570312 142.140625 187.519531 C 142.140625 198.875 143.886719 209.816406 147.121094 220.101562 C 151.847656 217.75 156.363281 215.316406 160.660156 212.84375 C 158.394531 204.789062 157.183594 196.296875 157.183594 187.519531 C 157.183594 135.871094 199.089844 93.996094 250.789062 93.996094 C 302.484375 93.996094 344.390625 135.871094 344.390625 187.519531 C 344.390625 239.171875 302.484375 281.042969 250.789062 281.042969 C 222.75 281.042969 197.597656 268.722656 180.441406 249.210938 C 175.453125 251.152344 170.402344 252.917969 165.289062 254.511719 C 185.183594 279.816406 216.082031 296.070312 250.789062 296.070312 C 310.792969 296.070312 359.433594 247.472656 359.433594 187.519531 C 359.433594 127.570312 310.792969 78.96875 250.789062 78.96875 " fill-opacity="1" fill-rule="nonzero"/>
36
- </g>
37
- <path fill="#edb641" d="M 92.292969 173.023438 L 98.289062 191.460938 L 117.691406 191.460938 L 101.992188 202.855469 L 107.988281 221.292969 L 92.292969 209.898438 L 76.59375 221.292969 L 82.589844 202.855469 L 66.894531 191.460938 L 86.296875 191.460938 L 92.292969 173.023438 " fill-opacity="1" fill-rule="nonzero"/>
38
- <path fill="#edb641" d="M 120.214844 112.25 L 125.390625 128.167969 L 142.140625 128.167969 L 128.589844 138 L 133.765625 153.917969 L 120.214844 144.082031 L 106.664062 153.917969 L 111.839844 138 L 98.289062 128.167969 L 115.039062 128.167969 L 120.214844 112.25 " fill-opacity="1" fill-rule="nonzero"/>
39
- <path fill="#edb641" d="M 34.695312 209.136719 L 37.71875 218.421875 L 47.492188 218.421875 L 39.585938 224.160156 L 42.605469 233.449219 L 34.695312 227.707031 L 26.792969 233.449219 L 29.8125 224.160156 L 21.90625 218.421875 L 31.679688 218.421875 L 34.695312 209.136719 " fill-opacity="1" fill-rule="nonzero"/>
40
- </svg>
41
- </a>
42
-
43
- <span aria-hidden="true" class="text-on-surface-subtle text-xl font-light leading-none">+</span>
44
-
45
- <a href="https://vite.dev" target="_blank" rel="noreferrer" class="block transition-opacity duration-200 hover:opacity-80" aria-label="Vite">
46
- <svg viewBox="0 0 410 404" class="h-12 w-auto" fill="none" xmlns="http://www.w3.org/2000/svg">
47
- <path d="M399.641 59.5246L215.643 388.545C211.844 395.338 202.084 395.378 198.228 388.618L10.5817 59.5563C6.38087 52.1896 12.6802 43.2665 21.0281 44.7586L205.223 77.6824C206.398 77.8924 207.601 77.8904 208.776 77.6763L389.119 44.8058C397.439 43.2894 403.768 52.1434 399.641 59.5246Z" fill="url(#paint0_linear)"/>
48
- <path d="M292.965 1.5744L156.801 28.2552C154.563 28.6937 152.906 30.5903 152.771 32.8664L144.395 174.33C144.198 177.662 147.258 180.248 150.51 179.498L188.42 170.749C191.967 169.931 195.172 173.055 194.443 176.622L183.18 231.775C182.422 235.487 185.907 238.661 189.532 237.56L212.947 230.446C216.577 229.344 220.065 232.527 219.297 236.242L201.398 322.875C200.278 328.294 207.486 331.249 210.492 326.603L212.5 323.5L323.454 102.072C325.312 98.3645 322.108 94.137 318.036 94.9228L279.014 102.454C275.347 103.161 272.227 99.746 273.262 96.1583L298.731 7.86689C299.767 4.27314 296.636 0.855181 292.965 1.5744Z" fill="url(#paint1_linear)"/>
49
- <defs>
50
- <linearGradient id="paint0_linear" x1="6.00017" y1="32.9999" x2="235" y2="344" gradientUnits="userSpaceOnUse">
51
- <stop stop-color="#41D1FF"/>
52
- <stop offset="1" stop-color="#BD34FE"/>
53
- </linearGradient>
54
- <linearGradient id="paint1_linear" x1="194.651" y1="8.81818" x2="236.076" y2="292.989" gradientUnits="userSpaceOnUse">
55
- <stop stop-color="#FFEA83"/>
56
- <stop offset="0.0833333" stop-color="#FFDD35"/>
57
- <stop offset="1" stop-color="#FFA800"/>
58
- </linearGradient>
59
- </defs>
60
- </svg>
61
- </a>
62
- </div>
66
+ <span aria-hidden="true" class="text-on-surface-subtle text-xl leading-none font-light">+</span>
63
67
 
64
- <h1 class="text-on-surface text-brand-glow font-light uppercase text-2xl sm:text-4xl mb-4" style="letter-spacing: 0.25em;">
65
- Litestar Vite
66
- </h1>
67
- <p class="text-on-surface-subtle text-base">
68
- Frontend Development Server
69
- </p>
70
- </header>
68
+ <a href="https://vite.dev" target="_blank" rel="noreferrer" class="block transition-opacity duration-200 hover:opacity-80" aria-label="Vite">
69
+ <svg viewBox="0 0 410 404" class="h-12 w-auto" fill="none" xmlns="http://www.w3.org/2000/svg">
70
+ <path
71
+ d="M399.641 59.5246L215.643 388.545C211.844 395.338 202.084 395.378 198.228 388.618L10.5817 59.5563C6.38087 52.1896 12.6802 43.2665 21.0281 44.7586L205.223 77.6824C206.398 77.8924 207.601 77.8904 208.776 77.6763L389.119 44.8058C397.439 43.2894 403.768 52.1434 399.641 59.5246Z"
72
+ fill="url(#paint0_linear)"
73
+ />
74
+ <path
75
+ d="M292.965 1.5744L156.801 28.2552C154.563 28.6937 152.906 30.5903 152.771 32.8664L144.395 174.33C144.198 177.662 147.258 180.248 150.51 179.498L188.42 170.749C191.967 169.931 195.172 173.055 194.443 176.622L183.18 231.775C182.422 235.487 185.907 238.661 189.532 237.56L212.947 230.446C216.577 229.344 220.065 232.527 219.297 236.242L201.398 322.875C200.278 328.294 207.486 331.249 210.492 326.603L212.5 323.5L323.454 102.072C325.312 98.3645 322.108 94.137 318.036 94.9228L279.014 102.454C275.347 103.161 272.227 99.746 273.262 96.1583L298.731 7.86689C299.767 4.27314 296.636 0.855181 292.965 1.5744Z"
76
+ fill="url(#paint1_linear)"
77
+ />
78
+ <defs>
79
+ <linearGradient id="paint0_linear" x1="6.00017" y1="32.9999" x2="235" y2="344" gradientUnits="userSpaceOnUse">
80
+ <stop stop-color="#41D1FF" />
81
+ <stop offset="1" stop-color="#BD34FE" />
82
+ </linearGradient>
83
+ <linearGradient id="paint1_linear" x1="194.651" y1="8.81818" x2="236.076" y2="292.989" gradientUnits="userSpaceOnUse">
84
+ <stop stop-color="#FFEA83" />
85
+ <stop offset="0.0833333" stop-color="#FFDD35" />
86
+ <stop offset="1" stop-color="#FFA800" />
87
+ </linearGradient>
88
+ </defs>
89
+ </svg>
90
+ </a>
91
+ </div>
71
92
 
72
- <!-- Status surface: bordered, no glass; "borders over shadows" -->
73
- <section class="rounded-brand-lg border border-outline bg-navy-surface">
93
+ <h1 class="text-on-surface text-brand-glow mb-4 text-2xl font-light uppercase sm:text-4xl" style="letter-spacing: 0.25em">Litestar Vite</h1>
94
+ <p class="text-on-surface-subtle text-base">Frontend Development Server</p>
95
+ </header>
74
96
 
75
- <!-- Status row -->
76
- <div class="flex items-center gap-3 px-8 py-5 border-b border-outline">
77
- <span class="relative inline-flex h-2.5 w-2.5">
78
- <span class="absolute inline-flex h-full w-full rounded-full bg-success opacity-60 animate-pulse-dot"></span>
79
- <span class="relative inline-flex h-2.5 w-2.5 rounded-full bg-success"></span>
80
- </span>
81
- <span class="text-on-surface text-xs font-semibold uppercase tracking-widest">
82
- Server Active
83
- </span>
84
- <span aria-hidden="true" class="ml-auto text-on-surface-subtle text-xs font-mono uppercase tracking-widest">
85
- HMR
86
- </span>
87
- </div>
97
+ <!-- Status surface: bordered, no glass; "borders over shadows" -->
98
+ <section class="rounded-brand-lg border-outline bg-navy-surface border">
99
+ <!-- Status row -->
100
+ <div class="border-outline flex items-center gap-3 border-b px-8 py-5">
101
+ <span class="relative inline-flex h-2.5 w-2.5">
102
+ <span class="bg-success animate-pulse-dot absolute inline-flex h-full w-full rounded-full opacity-60"></span>
103
+ <span class="bg-success relative inline-flex h-2.5 w-2.5 rounded-full"></span>
104
+ </span>
105
+ <span class="text-on-surface text-xs font-semibold tracking-widest uppercase"> Server Active </span>
106
+ <span aria-hidden="true" class="text-on-surface-subtle ml-auto font-mono text-xs tracking-widest uppercase"> HMR </span>
107
+ </div>
88
108
 
89
- <div class="px-8 py-8 sm:px-10 sm:py-10 space-y-8">
109
+ <div class="space-y-8 px-8 py-8 sm:px-10 sm:py-10">
110
+ <p class="text-on-surface-muted text-base leading-relaxed">
111
+ This server provides
112
+ <strong class="text-on-surface font-medium">Hot Module Replacement</strong>
113
+ for your assets. To view your application, ensure your Litestar backend is running.
114
+ </p>
90
115
 
91
- <p class="text-on-surface-muted text-base leading-relaxed">
92
- This server provides
93
- <strong class="text-on-surface font-medium">Hot Module Replacement</strong>
94
- for your assets. To view your application, ensure your Litestar backend is running.
95
- </p>
96
-
97
- <div>
98
- <p class="text-on-surface-subtle text-xs font-semibold uppercase tracking-widest mb-3">
99
- Application URL
100
- </p>
101
- <a href="{{ APP_URL }}"
102
- class="group flex w-full items-center gap-3 rounded-brand border-l-[3px] border-l-gold border border-outline bg-navy-surface-variant px-4 py-3 font-mono text-base text-gold transition-colors duration-200 hover:bg-navy hover:text-gold-light">
103
- <span class="min-w-0 flex-1 break-all select-all">{{ APP_URL }}</span>
104
- <svg xmlns="http://www.w3.org/2000/svg" class="h-3.5 w-3.5 flex-none opacity-60 transition-opacity group-hover:opacity-100" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
105
- <path stroke-linecap="round" stroke-linejoin="round" d="M14 5l7 7m0 0l-7 7m7-7H3" />
106
- </svg>
107
- </a>
108
- </div>
109
- </div>
110
- </section>
111
-
112
- <!-- Footer: restrained bordered link, no pill/glass -->
113
- <footer class="mt-8 flex justify-center">
114
- <a href="https://docs.litestar.dev/latest/topics/integrations/vite/" target="_blank" rel="noreferrer"
115
- class="group inline-flex items-center gap-2 text-sm text-on-surface-muted transition-colors duration-200 hover:text-gold">
116
- <span>Documentation</span>
117
- <svg xmlns="http://www.w3.org/2000/svg" class="h-3.5 w-3.5 transition-transform duration-200 group-hover:translate-x-0.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
118
- <path stroke-linecap="round" stroke-linejoin="round" d="M14 5l7 7m0 0l-7 7m7-7H3" />
119
- </svg>
116
+ <div>
117
+ <p class="text-on-surface-subtle mb-3 text-xs font-semibold tracking-widest uppercase">Application URL</p>
118
+ <a
119
+ href="{{ APP_URL }}"
120
+ class="group rounded-brand border-l-gold border-outline bg-navy-surface-variant text-gold hover:bg-navy hover:text-gold-light flex w-full items-center gap-3 border border-l-[3px] px-4 py-3 font-mono text-base transition-colors duration-200"
121
+ >
122
+ <span class="min-w-0 flex-1 break-all select-all">{{ APP_URL }}</span>
123
+ <svg
124
+ xmlns="http://www.w3.org/2000/svg"
125
+ class="h-3.5 w-3.5 flex-none opacity-60 transition-opacity group-hover:opacity-100"
126
+ fill="none"
127
+ viewBox="0 0 24 24"
128
+ stroke="currentColor"
129
+ stroke-width="2"
130
+ >
131
+ <path stroke-linecap="round" stroke-linejoin="round" d="M14 5l7 7m0 0l-7 7m7-7H3" />
132
+ </svg>
120
133
  </a>
121
- </footer>
134
+ </div>
135
+ </div>
136
+ </section>
137
+
138
+ <!-- Footer: restrained bordered link, no pill/glass -->
139
+ <footer class="mt-8 flex justify-center">
140
+ <a
141
+ href="https://docs.litestar.dev/latest/topics/integrations/vite/"
142
+ target="_blank"
143
+ rel="noreferrer"
144
+ class="group text-on-surface-muted hover:text-gold inline-flex items-center gap-2 text-sm transition-colors duration-200"
145
+ >
146
+ <span>Documentation</span>
147
+ <svg
148
+ xmlns="http://www.w3.org/2000/svg"
149
+ class="h-3.5 w-3.5 transition-transform duration-200 group-hover:translate-x-0.5"
150
+ fill="none"
151
+ viewBox="0 0 24 24"
152
+ stroke="currentColor"
153
+ stroke-width="2"
154
+ >
155
+ <path stroke-linecap="round" stroke-linejoin="round" d="M14 5l7 7m0 0l-7 7m7-7H3" />
156
+ </svg>
157
+ </a>
158
+ </footer>
122
159
  </main>
123
- </body>
160
+ </body>
124
161
  </html>
@@ -316,11 +316,11 @@ const directives = [
316
316
  if (!(el instanceof HTMLInputElement || el instanceof HTMLSelectElement || el instanceof HTMLTextAreaElement))
317
317
  return null;
318
318
  const key = a.value;
319
- return (ctx, el) => {
319
+ return (ctx, innerEl) => {
320
320
  const v = ctx[key];
321
321
  if (v === undefined)
322
322
  return;
323
- const inp = el;
323
+ const inp = innerEl;
324
324
  if (inp.type === "checkbox")
325
325
  inp.checked = Boolean(v);
326
326
  else if (inp.type === "radio")
@@ -40,4 +40,4 @@
40
40
  */
41
41
  export { csrfFetch, csrfHeaders, getCsrfToken } from "./csrf.js";
42
42
  export { addDirective, registerHtmxExtension, setDebug as setHtmxDebug, swapJson } from "./htmx.js";
43
- export { createRouteHelpers, currentRoute, isCurrentRoute, isRoute, type RouteDefinition, type RouteDefinitions, type RouteHelpers, toRoute, } from "./routes.js";
43
+ export { createRouteHelpers, currentRoute, isCurrentRoute, isRoute, type RouteDefinition, type RouteDefinitions, type RouteHelpers, toRoute } from "./routes.js";
@@ -43,4 +43,4 @@ export { csrfFetch, csrfHeaders, getCsrfToken } from "./csrf.js";
43
43
  // HTMX utilities
44
44
  export { addDirective, registerHtmxExtension, setDebug as setHtmxDebug, swapJson } from "./htmx.js";
45
45
  // Route matching utilities
46
- export { createRouteHelpers, currentRoute, isCurrentRoute, isRoute, toRoute, } from "./routes.js";
46
+ export { createRouteHelpers, currentRoute, isCurrentRoute, isRoute, toRoute } from "./routes.js";
package/dist/js/index.js CHANGED
@@ -15,7 +15,7 @@ import { buildInputOptions, resolveUserBuildInput } from "./shared/vite-compat.j
15
15
  let exitHandlersBound = false;
16
16
  let warnedMissingRuntimeConfig = false;
17
17
  const MAX_TRANSFORM_PAYLOAD_BYTES = 1e6;
18
- const refreshPaths = ["src/**", "resources/**", "assets/**"].filter((path2) => fs.existsSync(path2.replace(/\*\*$/, "")));
18
+ const refreshPaths = ["src/**", "resources/**", "assets/**"].filter((p) => fs.existsSync(p.replace(/\*\*$/, "")));
19
19
  function litestar(config) {
20
20
  const pluginConfig = resolvePluginConfig(config);
21
21
  const plugins = [resolveLitestarPlugin(pluginConfig), ...resolveFullReloadConfig(pluginConfig)];
@@ -145,7 +145,7 @@ function resolveLitestarPlugin(pluginConfig) {
145
145
  hmr: userConfig.server?.hmr === false ? false : {
146
146
  path: "vite-hmr",
147
147
  ...proxyHmrClientPort ? { clientPort: proxyHmrClientPort } : {},
148
- ...serverConfig?.hmr ?? {},
148
+ ...serverConfig?.hmr,
149
149
  ...userConfig.server?.hmr === true ? {} : userConfig.server?.hmr
150
150
  },
151
151
  // Auto-configure proxy to forward API requests to Litestar backend
@@ -733,8 +733,8 @@ function resolveInput(config, ssr) {
733
733
  }
734
734
  return config.input;
735
735
  }
736
- function isAbsolutePath(path2) {
737
- return path2.startsWith("/") || /^[a-zA-Z]:[\\/]/.test(path2);
736
+ function isAbsolutePath(filePath) {
737
+ return filePath.startsWith("/") || /^[a-zA-Z]:[\\/]/.test(filePath);
738
738
  }
739
739
  function resolveOutDir(config, ssr) {
740
740
  const dir = ssr ? config.ssrOutDir : config.bundleDir;
@@ -743,10 +743,11 @@ function resolveOutDir(config, ssr) {
743
743
  }
744
744
  return dir.replace(/^\/+/, "").replace(/\/+$/, "");
745
745
  }
746
- function resolveFullReloadConfig({ refresh: config }) {
747
- if (typeof config === "boolean") {
746
+ function resolveFullReloadConfig({ refresh }) {
747
+ if (typeof refresh === "boolean") {
748
748
  return [];
749
749
  }
750
+ let config = refresh;
750
751
  if (typeof config === "string") {
751
752
  config = [{ paths: [config] }];
752
753
  }
@@ -78,7 +78,7 @@ export interface FlashMessages {}
78
78
  } : {}
79
79
  };
80
80
  const generatedSharedProps = Object.keys(json.sharedProps ?? {}).length > 0 ? json.sharedProps : defaultGeneratedSharedProps;
81
- const generatedSharedPropLines = Object.entries(generatedSharedProps).sort(([a], [b]) => a.localeCompare(b)).map(([key, def]) => {
81
+ const generatedSharedPropLines = Object.entries(generatedSharedProps).toSorted(([a], [b]) => a.localeCompare(b)).map(([key, def]) => {
82
82
  const optional = def.optional ? "?" : "";
83
83
  const safeKey = /^[$A-Z_][0-9A-Z_$]*$/i.test(key) ? key : JSON.stringify(key);
84
84
  return ` ${safeKey}${optional}: ${def.type}`;
@@ -151,8 +151,8 @@ export interface FlashMessages {}
151
151
  }
152
152
  }
153
153
  }
154
- const apiImports = [...allCustomTypes].filter((t) => availableApiTypes.has(t)).sort();
155
- const remainingTypes = [...allCustomTypes].filter((t) => !availableApiTypes.has(t)).sort();
154
+ const apiImports = [...allCustomTypes].filter((t) => availableApiTypes.has(t)).toSorted();
155
+ const remainingTypes = [...allCustomTypes].filter((t) => !availableApiTypes.has(t)).toSorted();
156
156
  const importsByPath = /* @__PURE__ */ new Map();
157
157
  const unresolvedTypes = [];
158
158
  for (const t of remainingTypes) {
@@ -179,9 +179,9 @@ export interface FlashMessages {}
179
179
  importStatement += `import type { ${apiImports.join(", ")} } from "./api/types.gen"
180
180
  `;
181
181
  }
182
- const sortedImportPaths = [...importsByPath.keys()].sort();
182
+ const sortedImportPaths = [...importsByPath.keys()].toSorted();
183
183
  for (const p of sortedImportPaths) {
184
- const names = (importsByPath.get(p) ?? []).sort();
184
+ const names = (importsByPath.get(p) ?? []).toSorted();
185
185
  if (names.length > 0) {
186
186
  importStatement += `import type { ${names.join(", ")} } from "${p}"
187
187
  `;
@@ -39,8 +39,8 @@ function parseHeyApiTypes(content) {
39
39
  }
40
40
  return { dataTypes, responsesTypes, errorsTypes, urlToDataType };
41
41
  }
42
- function normalizePath(path2) {
43
- return path2.replace(/\{([^:}]+):[^}]+\}/g, "{$1}");
42
+ function normalizePath(routePath) {
43
+ return routePath.replace(/\{([^:}]+):[^}]+\}/g, "{$1}");
44
44
  }
45
45
  function createOperationMappings(routes, urlToDataType, responsesTypes, errorsTypes) {
46
46
  const mappings = [];
@@ -69,7 +69,7 @@ function createOperationMappings(routes, urlToDataType, responsesTypes, errorsTy
69
69
  errorsType
70
70
  });
71
71
  }
72
- return mappings.sort((a, b) => a.routeName.localeCompare(b.routeName));
72
+ return mappings.toSorted((a, b) => a.routeName.localeCompare(b.routeName));
73
73
  }
74
74
  function generateSchemasTs(mappings, apiTypesImportPath) {
75
75
  const validMappings = mappings.filter((m) => m.dataType || m.responsesType);
@@ -105,7 +105,7 @@ export type SuccessResponse<T extends OperationName> = never
105
105
  const dataTypeImports = [...new Set(validMappings.map((m) => m.dataType).filter(Boolean))];
106
106
  const responsesTypeImports = [...new Set(validMappings.map((m) => m.responsesType).filter(Boolean))];
107
107
  const errorsTypeImports = [...new Set(validMappings.map((m) => m.errorsType).filter(Boolean))];
108
- const allImports = [...dataTypeImports, ...responsesTypeImports, ...errorsTypeImports].sort();
108
+ const allImports = [...dataTypeImports, ...responsesTypeImports, ...errorsTypeImports].toSorted();
109
109
  const operationNames = validMappings.map((m) => ` | '${m.routeName}'`).join("\n");
110
110
  const dataTypeEntries = validMappings.filter((m) => m.dataType).map((m) => ` '${m.routeName}': ${m.dataType}`).join("\n");
111
111
  const responsesTypeEntries = validMappings.filter((m) => m.responsesType).map((m) => ` '${m.routeName}': ${m.responsesType}`).join("\n");
@@ -46,7 +46,7 @@ function isOptionalMetadataMatch(a, b) {
46
46
  return isMetadataMatch(a, b);
47
47
  }
48
48
  function hashObject(obj) {
49
- const sorted = JSON.stringify(obj, Object.keys(obj).sort());
49
+ const sorted = JSON.stringify(obj, Object.keys(obj).toSorted());
50
50
  return crypto.createHash("sha256").update(sorted).digest("hex");
51
51
  }
52
52
  async function shouldRunOpenApiTs(openapiPath, configPath, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "litestar-vite-plugin",
3
- "version": "0.23.4",
3
+ "version": "0.24.1",
4
4
  "type": "module",
5
5
  "description": "Litestar plugin for Vite.",
6
6
  "keywords": [
@@ -94,16 +94,22 @@
94
94
  "build-helpers": "rm -rf dist/js/helpers && tsc --project src/js/tsconfig.helpers.json",
95
95
  "build-inertia-helpers": "rm -rf dist/js/inertia-helpers && tsc --project src/js/tsconfig.inertia-helpers.json",
96
96
  "build-integrations": "esbuild src/js/src/astro.ts src/js/src/sveltekit.ts src/js/src/nuxt.ts src/js/src/inertia-types.ts --platform=node --format=esm --outdir=dist/js",
97
- "lint": "biome check --vcs-enabled=false src/js/src src/js/tests",
97
+ "lint": "oxlint src/js/src src/js/tests",
98
+ "lint:examples": "oxlint examples",
99
+ "lint:all": "npm run lint && npm run lint:examples",
100
+ "fmt": "oxfmt src/js/src src/js/tests",
101
+ "fmt:check": "oxfmt --check src/js/src src/js/tests",
98
102
  "test": "vitest --config ./src/js/vitest.config.ts run"
99
103
  },
100
104
  "devDependencies": {
101
- "@biomejs/biome": "2.0.6",
102
105
  "@tailwindcss/vite": "^4.0.0",
103
106
  "@types/node": "^22.15.3",
104
107
  "@vitest/coverage-v8": "^3.2.4",
105
108
  "esbuild": "0.27.4",
106
109
  "happy-dom": "^20.0.2",
110
+ "oxfmt": "^0.51.0",
111
+ "oxlint": "^1.66.0",
112
+ "svelte": "^5.56.0",
107
113
  "tailwindcss": "^4.0.0",
108
114
  "typescript": "^5.8.3",
109
115
  "vite": "^8.0.0",
@@ -114,7 +120,7 @@
114
120
  "vite": "^7.0.0 || ^8.0.0"
115
121
  },
116
122
  "engines": {
117
- "node": "^20.19.0 || >=22.12.0"
123
+ "node": ">=22.12.0"
118
124
  },
119
125
  "dependencies": {
120
126
  "picocolors": "^1.1.1",
package/tools/clean.js CHANGED
@@ -8,7 +8,7 @@ import { dirname } from "node:path"
8
8
  */
9
9
 
10
10
  const argument = (name) => {
11
- const index = process.argv.findIndex((argument) => argument.startsWith(`--${name}=`))
11
+ const index = process.argv.findIndex((arg) => arg.startsWith(`--${name}=`))
12
12
 
13
13
  return index === -1 ? undefined : process.argv[index].substring(`--${name}=`.length)
14
14
  }
@@ -48,7 +48,11 @@ const main = () => {
48
48
 
49
49
  const isSsr = Array.isArray(manifest[manifestFiles[0]])
50
50
 
51
- isSsr ? info("SSR manifest found.") : info("Non-SSR manifest found.")
51
+ if (isSsr) {
52
+ info("SSR manifest found.")
53
+ } else {
54
+ info("Non-SSR manifest found.")
55
+ }
52
56
 
53
57
  const manifestAssets = isSsr ? manifestFiles.flatMap((key) => manifest[key]) : manifestFiles.flatMap((key) => [...(manifest[key].css ?? []), manifest[key].file])
54
58
 
@@ -63,12 +67,20 @@ const main = () => {
63
67
  if (orphanedAssets.length === 0) {
64
68
  info("No orphaned assets found.")
65
69
  } else {
66
- orphanedAssets.length === 1 ? info(`[${orphanedAssets.length}] orphaned asset found.`) : info(`[${orphanedAssets.length}] orphaned assets found.`)
70
+ if (orphanedAssets.length === 1) {
71
+ info(`[${orphanedAssets.length}] orphaned asset found.`)
72
+ } else {
73
+ info(`[${orphanedAssets.length}] orphaned assets found.`)
74
+ }
67
75
 
68
76
  orphanedAssets.forEach((asset) => {
69
77
  const path = `${assetsPath}/${asset.name}`
70
78
 
71
- option("dry-run") ? info(`Orphaned asset [${path}] would be removed.`) : info(`Removing orphaned asset [${path}].`)
79
+ if (option("dry-run")) {
80
+ info(`Orphaned asset [${path}] would be removed.`)
81
+ } else {
82
+ info(`Removing orphaned asset [${path}].`)
83
+ }
72
84
 
73
85
  if (!option("dry-run")) {
74
86
  unlinkSync(path)