From d9e0794b836f26bdf9f08b119cc3937de9b4e3c2 Mon Sep 17 00:00:00 2001 From: buenosairesam Date: Wed, 29 Apr 2026 06:11:40 -0300 Subject: [PATCH] fix vite resolution for soleprint-ui deps; align kind template - vite: alias @vue-flow/core and uplot to detection-app's node_modules so they resolve when imported through the symlinked soleprint-ui framework (Vite follows the symlink and would otherwise look up from ui/framework/, where node_modules doesn't exist) - kind-config.yaml.tpl: match the new port layout (gateway on 30080 via 127.0.0.1, redis on 6382), avoiding port-80 conflict with Caddy; keeps the extraMount for /mnt/media so MinIO can seed from host --- ctrl/k8s/kind-config.yaml.tpl | 12 +++++------- ui/detection-app/vite.config.ts | 5 +++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ctrl/k8s/kind-config.yaml.tpl b/ctrl/k8s/kind-config.yaml.tpl index 6eaf74c..99d3c9a 100644 --- a/ctrl/k8s/kind-config.yaml.tpl +++ b/ctrl/k8s/kind-config.yaml.tpl @@ -4,16 +4,14 @@ name: mpr nodes: - role: control-plane extraPortMappings: + # Gateway → routed via Caddy on port 80 (mpr.local.ar, k8s.mpr.local.ar) - containerPort: 30080 - hostPort: 80 + hostPort: 30080 + listenAddress: "127.0.0.1" protocol: TCP + # Redis - containerPort: 30379 - hostPort: 6379 - listenAddress: "0.0.0.0" - protocol: TCP - - containerPort: 30432 - hostPort: 5432 - listenAddress: "0.0.0.0" + hostPort: 6382 protocol: TCP extraMounts: - hostPath: ${MEDIA_HOST_PATH} diff --git a/ui/detection-app/vite.config.ts b/ui/detection-app/vite.config.ts index 37be6aa..94ff62d 100644 --- a/ui/detection-app/vite.config.ts +++ b/ui/detection-app/vite.config.ts @@ -9,6 +9,11 @@ export default defineConfig({ alias: { '@': resolve(__dirname, 'src'), '@common': resolve(__dirname, '../common'), + // soleprint-ui is symlinked (link:../framework). Vite follows the symlink + // and resolves its bare imports from ui/framework/, where node_modules + // doesn't exist. Pin the framework's runtime deps to this app's deps. + '@vue-flow/core': resolve(__dirname, 'node_modules/@vue-flow/core'), + 'uplot': resolve(__dirname, 'node_modules/uplot'), }, }, server: {