fix(mitm): harden packaged runtime and privileged command execution

Compile MITM utilities as NodeNext ESM for prepublish builds, copy the
CommonJS MITM server into standalone artifacts, and resolve MITM data
paths without relying on Next.js aliases at runtime.

Replace shell-interpolated setup and elevated command flows with
argument-based spawn and execFile helpers for database setup, DNS edits,
certificate install flows, and Tailscale sudo execution. Also tighten
the Electron production CSP, update provider icon loading to use direct
@lobehub/icons imports with local fallbacks, and pin dependency
configuration to avoid unused peer installs and known audit findings.
This commit is contained in:
diegosouzapw
2026-04-25 00:31:43 -03:00
parent 0e15988233
commit 1f962a2167
18 changed files with 816 additions and 7516 deletions

View File

@@ -59,7 +59,7 @@ const nextConfig = {
"util",
"process",
],
transpilePackages: ["@omniroute/open-sse"],
transpilePackages: ["@omniroute/open-sse", "@lobehub/icons"],
allowedDevOrigins: ["localhost", "127.0.0.1", "192.168.*"],
typescript: {
// TODO: Re-enable after fixing all sub-component useTranslations scope issues