(value: string | undefined)
| 67 | } |
| 68 | |
| 69 | function stringArrayValue(value: string | undefined): string[] | undefined { |
| 70 | if (!value) return undefined |
| 71 | try { |
| 72 | const parsed = JSON.parse(value) as unknown |
| 73 | if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) return parsed |
| 74 | } catch { |
| 75 | // Fall through to whitespace splitting for local shell convenience. |
| 76 | } |
| 77 | return value.split(/\s+/).map((item) => item.trim()).filter(Boolean) |
| 78 | } |
| 79 | |
| 80 | function readConfigFile(filePath: string | undefined): RuntimeNodeServeConfig { |
| 81 | if (!filePath) return {} |
no outgoing calls
no test coverage detected