Skip to content

Commit 52cd8e4

Browse files
committed
fix: type generation
1 parent b5af6f2 commit 52cd8e4

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

lib/commands/types.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,10 @@ const typesCommand = actionRunner(async (rawOutputDirectory, {language, strict})
9797
fs.mkdirSync(outputDirectory, { recursive: true });
9898
}
9999

100-
if (!fs.existsSync("appwrite.json")) {
101-
throw new Error("appwrite.json not found in current directory");
102-
}
103-
104100
const collections = localConfig.getCollections();
105101
if (collections.length === 0) {
106-
throw new Error("No collections found in appwrite.json");
102+
const configFileName = path.basename(localConfig.path);
103+
throw new Error(`No collections found in configuration. Make sure ${configFileName} exists and contains collections.`);
107104
}
108105

109106
log(`Found ${collections.length} collections: ${collections.map(c => c.name).join(", ")}`);

0 commit comments

Comments
 (0)