MCPcopy Index your code
hub / github.com/CapSoftware/Cap / main

Function main

scripts/analytics/check-analytics.js:158–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156}
157
158async 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
183main();

Callers 1

check-analytics.jsFile · 0.70

Calls 3

createTinybirdClientFunction · 0.90
validateTablesFunction · 0.85
validatePipesFunction · 0.85

Tested by

no test coverage detected