voice-over-translation/vite/lib/define.ts
NullVerdict 2ff7985607
Some checks are pending
Build / node (22.x) (push) Waiting to run
Build / extension (22.x) (push) Waiting to run
Build / bun (push) Waiting to run
Release / Build Release (push) Waiting to run
Release / create_release (push) Blocked by required conditions
refactor: subtitles, mute logic and build tooling
Large refactor: improve subtitle parsing, tokenization and wrapping (displayModel, renderPlan, smartWrap, standards, widget) to handle HTML tags, punctuation, attached word/number cases and VTT/ASS edge cases. Simplify VideoManager/VideoHandler mute API (removed preserve option) and add logic to preserve YouTube volume storage where needed; update smart ducking usage and UI volume handling. Sanitize extension bridge/notifications errors and GM notification fields. Restructure Vite build helpers into vite/lib (paths, env, manifest/userscript tooling, chrome-postbuild) and update configs to use new utilities. Misc utils and filename trimming fixes.
2026-07-05 15:47:43 +03:00

20 lines
476 B
TypeScript

type DefineValue =
| string
| number
| boolean
| null
| readonly DefineValue[]
| { readonly [key: string]: DefineValue };
export type ViteDefine = NonNullable<import("vite").UserConfig["define"]>;
export function defineConstants(
constants: Record<string, DefineValue>,
): ViteDefine {
return Object.fromEntries(
Object.entries(constants).map(([key, value]) => [
key,
typeof value === "string" ? JSON.stringify(value) : value,
]),
);
}