(ports: VmmTypes.IPortMapping[] = [])
| 339 | } |
| 340 | |
| 341 | const clonePortMappings = (ports: VmmTypes.IPortMapping[] = []): PortFormEntry[] => |
| 342 | ports.map((port) => ({ |
| 343 | protocol: port.protocol || 'tcp', |
| 344 | host_address: port.host_address || '127.0.0.1', |
| 345 | host_port: typeof port.host_port === 'number' ? port.host_port : null, |
| 346 | vm_port: typeof port.vm_port === 'number' ? port.vm_port : null, |
| 347 | })); |
| 348 | |
| 349 | const normalizePorts = (ports: PortFormEntry[] = []): VmmTypes.IPortMapping[] => |
| 350 | ports |