()
| 156 | } |
| 157 | |
| 158 | async function main() { |
| 159 | try { |
| 160 | const client = createTinybirdClient(); |
| 161 | const tableIssues = await validateTables(client); |
| 162 | const pipeIssues = await validatePipes(client); |
| 163 | const issues = [...tableIssues, ...pipeIssues]; |
| 164 | |
| 165 | if (issues.length > 0) { |
| 166 | console.error("❌ Tinybird analytics validation failed:"); |
| 167 | for (const issue of issues) { |
| 168 | console.error(` - ${issue}`); |
| 169 | } |
| 170 | process.exit(1); |
| 171 | } |
| 172 | |
| 173 | console.log("✅ Tinybird analytics setup is valid."); |
| 174 | } catch (error) { |
| 175 | console.error( |
| 176 | "❌ Tinybird analytics validation crashed:", |
| 177 | error instanceof Error ? error.message : error, |
| 178 | ); |
| 179 | process.exit(1); |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | main(); |
no test coverage detected