| 85 | } |
| 86 | |
| 87 | function isInstallPlan(value: unknown): value is InstallPlan { |
| 88 | if (typeof value !== 'object' || value === null) return false; |
| 89 | const v = value as Record<string, unknown>; |
| 90 | return ( |
| 91 | typeof v['host'] === 'string' && |
| 92 | typeof v['port'] === 'number' && |
| 93 | typeof v['logLevel'] === 'string' && |
| 94 | typeof v['program'] === 'string' && |
| 95 | Array.isArray(v['programArguments']) && |
| 96 | (v['programArguments'] as unknown[]).every((arg) => typeof arg === 'string') && |
| 97 | typeof v['logPath'] === 'string' && |
| 98 | typeof v['installedAt'] === 'string' |
| 99 | ); |
| 100 | } |