fix: 🐛 make typegen.js windows compatible
This commit is contained in:
parent
c3d62c5ae2
commit
dc0622848b
1 changed files with 9 additions and 2 deletions
|
|
@ -46,8 +46,15 @@ function deleteAllInDir(dir) {
|
|||
});
|
||||
}
|
||||
|
||||
OUTPUT_DIR = "schema";
|
||||
INPUT_DIR = "../schema/json";
|
||||
const OUTPUT_DIR = path.join("schema");
|
||||
const INPUT_DIR = path.join("..", "schema", "json");
|
||||
if (!fs.existsSync(INPUT_DIR)) {
|
||||
throw new Error(`Input directory does not exist: ${INPUT_DIR}`);
|
||||
}
|
||||
|
||||
if (!fs.existsSync(OUTPUT_DIR)) {
|
||||
throw new Error(`Output directory does not exist: ${OUTPUT_DIR}`);
|
||||
}
|
||||
|
||||
deleteAllInDir(OUTPUT_DIR);
|
||||
generateAllSchemas(INPUT_DIR, OUTPUT_DIR);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue