From 76cf5cd59716310245cb1e298a0db2686714bc44 Mon Sep 17 00:00:00 2001 From: hided62 Date: Wed, 5 Aug 2026 00:30:18 +0000 Subject: [PATCH] fix: isolate profile frontend base paths --- app/gateway-api/src/orchestrator/gatewayOrchestrator.ts | 5 ++++- app/gateway-api/test/orchestratorPlan.test.ts | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/gateway-api/src/orchestrator/gatewayOrchestrator.ts b/app/gateway-api/src/orchestrator/gatewayOrchestrator.ts index e94f66c..a7f6275 100644 --- a/app/gateway-api/src/orchestrator/gatewayOrchestrator.ts +++ b/app/gateway-api/src/orchestrator/gatewayOrchestrator.ts @@ -411,7 +411,10 @@ export const buildProcessDefinitions = ( script: frontendScript, cwd: frontendCwd, args: ['preview', '--host', '0.0.0.0', '--port', String(profile.apiPort - 1), '--outDir', frontendOutDir], - env: baseEnv, + env: { + ...baseEnv, + VITE_APP_BASE_PATH: `/${profile.profile}`, + }, }, api: { name: apiName, diff --git a/app/gateway-api/test/orchestratorPlan.test.ts b/app/gateway-api/test/orchestratorPlan.test.ts index 384a579..e146fd6 100644 --- a/app/gateway-api/test/orchestratorPlan.test.ts +++ b/app/gateway-api/test/orchestratorPlan.test.ts @@ -177,6 +177,7 @@ describe('buildProcessDefinitions', () => { ...processConfig, baseEnv: { DATABASE_URL: 'postgresql://integration.invalid/sammo', + VITE_APP_BASE_PATH: '/gateway', GATEWAY_ROLE: 'orchestrator', NODE_APP_INSTANCE: '2', name: 'sammo:gateway-orchestrator', @@ -193,6 +194,7 @@ describe('buildProcessDefinitions', () => { expect(definition.env).not.toHaveProperty('NODE_APP_INSTANCE'); expect(definition.env).not.toHaveProperty('GATEWAY_ROLE'); } + expect(definitions.frontend.env.VITE_APP_BASE_PATH).toBe('/che'); }); });