( value: Record<string, unknown>, key: string, )
| 104 | } |
| 105 | |
| 106 | function requireNonEmptyString( |
| 107 | value: Record<string, unknown>, |
| 108 | key: string, |
| 109 | ): string { |
| 110 | const found = value[key] |
| 111 | if (typeof found !== 'string' || found === '') { |
| 112 | throw new Error(`run request: ${key} must be a non-empty string`) |
| 113 | } |
| 114 | return found |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * Narrow an unknown `POST /run` body into a {@link ContainerRunRequest} (project |
no outgoing calls
no test coverage detected