TypeScript
test(relay): keep the stage slug helper private (#9998)
Julius Marmingeac93fbfad01e
diff --git a/infra/relay/src/deploymentConfig.test.ts b/infra/relay/src/deploymentConfig.test.tsindex 44c7627a4da..f090c70ee22 100644--- a/infra/relay/src/deploymentConfig.test.ts+++ b/infra/relay/src/deploymentConfig.test.ts@@ -11,17 +11,10 @@ import {RelayPublicDomainLabelTooLongError,relayPublicDomainForStage,relayResourceNameForStage,- relayStageSlug,} from "./deploymentConfig.ts";const isRelayPublicDomainLabelTooLongError = Schema.is(RelayPublicDomainLabelTooLongError);-describe("relayStageSlug", () => {- it("matches Alchemy physical-name sanitization for default developer stages", () => {- expect(relayStageSlug("dev_julius")).toBe("dev-julius");- });-});-describe("relayPublicDomainForStage", () => {it("uses the canonical relay hostname for production", () => {expect(relayPublicDomainForStage("prod", ".example.com.")).toBe("relay.example.com");diff --git a/infra/relay/src/deploymentConfig.ts b/infra/relay/src/deploymentConfig.tsindex fe9d37b2998..565e16422dd 100644--- a/infra/relay/src/deploymentConfig.ts+++ b/infra/relay/src/deploymentConfig.ts@@ -56,7 +56,7 @@ function appendDnsSafeSuffix(prefix: string, suffix: string): string {* Alchemy's physical-name helper sanitizes resource names after adding the* stage. Keep custom domains and runtime-created resources aligned with it.*/-export function relayStageSlug(stage: string): string {+function relayStageSlug(stage: string): string {return stage.toLowerCase().replaceAll(/[^a-z0-9-]/g, "-")