Skip to content

Commit 83db2d4

Browse files
committed
fix: skip type generation when queries directory is missing
Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
1 parent 2e1be40 commit 83db2d4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/shared/src/cli/commands/generate-types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import fs from "node:fs";
12
import path from "node:path";
23
import { Command } from "commander";
34

@@ -21,6 +22,12 @@ async function runGenerateTypes(
2122
outFile || path.join(process.cwd(), "client/src/appKitTypes.d.ts");
2223

2324
const queryFolder = path.join(resolvedRootDir, "config/queries");
25+
if (!fs.existsSync(queryFolder)) {
26+
console.warn(
27+
`Warning: No queries found at ${queryFolder}. Skipping type generation.`,
28+
);
29+
return;
30+
}
2431

2532
const resolvedWarehouseId =
2633
warehouseId || process.env.DATABRICKS_WAREHOUSE_ID;

0 commit comments

Comments
 (0)