(targets: string[])
| 605 | 'redis-http': 8079, |
| 606 | 'local-kms': 8900, |
| 607 | grafana: 4000, |
| 608 | }; |
| 609 | |
| 610 | const BYOK_KMS_SERVICE_BASE_PORT = 8901; |
| 611 | |
| 612 | // Base host port of dev/mock-snowflake; must agree with the fallback in |
| 613 | // dev/mock-snowflake/tls-env.ts. An offset worktree runs its own mock so the |
| 614 | // SNOWFLAKE_ACCOUNT_HOST its entry wires into .env.local matches its stack. |
| 615 | const MOCK_SNOWFLAKE_BASE_PORT = 4792; |
| 616 | |
| 617 | export function byokKmsServicePort(offset: number = portOffset): number { |
| 618 | return BYOK_KMS_SERVICE_BASE_PORT + offset; |
| 619 | } |
| 620 | |
| 621 | export function getInfraBasePort(serviceName: string): number | undefined { |
| 622 | return INFRA_PORTS[serviceName]; |
| 623 | } |
| 624 | |
| 625 | /** Connection string for this worktree's PostgreSQL container. */ |
| 626 | export function localPostgresUrl(): string { |
| 627 | return `postgres://postgres:postgres@localhost:${INFRA_PORTS.postgres + portOffset}/postgres`; |
| 628 | } |
| 629 | |
| 630 | // The export warehouse is a separate database on the same local Postgres. Create it |
| 631 | // with `createdb data_export` and load it from the schema repo. There is no |
no test coverage detected