@deploystack/docker-to-iac
Version:
Translate docker run and docker compose file to Infrastructure as Code
28 lines (27 loc) • 1.31 kB
TypeScript
/**
* Assertions for validating port mappings in DigitalOcean App Platform YAML output
*/
/**
* Validates that the port mappings in the DigitalOcean YAML match expected values
*
* @param doYaml The parsed DigitalOcean YAML template
* @param serviceName The name of the service to check
* @param expectedPort The expected port value
* @returns boolean indicating if validation passes
*/
export declare function validatePortMappingInDigitalOcean(doYaml: any, serviceName: string, expectedPort: number): boolean;
/**
* Validates port configurations across multiple services
* @param doYaml The parsed DigitalOcean YAML template
* @param expectedPorts Map of service names to their expected ports
* @returns boolean indicating if all validations pass
*/
export declare function validateMultiplePortMappings(doYaml: any, expectedPorts: Record<string, number>): boolean;
/**
* Validates that a service has the PORT environment variable set correctly
* @param doYaml The parsed DigitalOcean YAML template
* @param serviceName The name of the service to check
* @param expectedValue The expected value for the PORT variable
* @returns boolean indicating if validation passes
*/
export declare function validatePortEnvironmentVariable(doYaml: any, serviceName: string, expectedValue: string): boolean;