UNPKG

@deploystack/docker-to-iac

Version:

Translate docker run and docker compose file to Infrastructure as Code

13 lines (12 loc) 537 B
/** * Formats service names to match DigitalOcean's requirements: * - Must start with a lowercase letter * - Can only contain lowercase letters, numbers, and hyphens * - Must be between 2-32 characters * - Must end with a letter or number * - Must match regex: ^[a-z][a-z0-9-]{0,30}[a-z0-9]$ * * @param input - String, array of strings, or undefined to parse * @returns Formatted string meeting DigitalOcean's requirements */ export declare function digitalOceanParserServiceName(input: string | string[] | undefined): string;