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

Function ensureTinybirdLogin

scripts/analytics/setup-analytics.js:43–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41};
42
43const ensureTinybirdLogin = () => {
44 if (fs.existsSync(rootTinybPath)) {
45 return;
46 }
47 console.log("Tinybird credentials not found. Launching `tb login`...");
48 run(TB_BINARY, ["login"], { cwd: PROJECT_ROOT, stdio: "inherit" });
49 if (!fs.existsSync(rootTinybPath)) {
50 throw new Error(
51 "Tinybird login did not create a .tinyb file. Please rerun `tb login` and try again.",
52 );
53 }
54};
55
56const syncProjectTinyb = () => {
57 if (!fs.existsSync(rootTinybPath)) return;

Callers 1

mainFunction · 0.85

Calls 1

runFunction · 0.70

Tested by

no test coverage detected