| 700 | const sessionEnv: Record<string, string> = { |
| 701 | ...mobileEnv, |
| 702 | KILO_PORT_OFFSET: String(portOffset), |
| 703 | PATH: sessionPath, |
| 704 | WRANGLER_REGISTRY_PATH: wranglerRegistryPath, |
| 705 | }; |
| 706 | for (const key of ['PNPM_HOME', 'COREPACK_HOME', 'npm_execpath']) { |
| 707 | const value = process.env[key]; |
| 708 | if (value !== undefined && value !== '') { |
| 709 | sessionEnv[key] = value; |
| 710 | } |
| 711 | } |
| 712 | if (process.env.PORT !== undefined && process.env.PORT !== '') { |
| 713 | sessionEnv.PORT = String(getService('nextjs').port); |
| 714 | } |
| 715 | const sessionNextAuthUrl = resolveSessionNextAuthUrl({ |
| 716 | portOffset, |
| 717 | serviceNames, |
| 718 | nextjsPort: getService('nextjs').port, |
| 719 | }); |
| 720 | if (sessionNextAuthUrl !== undefined) { |