0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(schema): update db-entries generation job (#120)

On Node 16.x.x fs.rmdir throw err if dir does not exist
Also from Node 16.x.x fs.rmdir will be deprecated, use fs.rm instead
This commit is contained in:
simeng-li 2021-09-28 10:02:30 +08:00 committed by GitHub
parent 8de4fdf5a4
commit 34e979d7d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,7 +101,7 @@ const generate = async () => {
const tsTypesFilename = '../foundations';
const header = '// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n\n';
await fs.rmdir(generatedDirectory, { recursive: true });
await fs.rm(generatedDirectory, { recursive: true, force: true });
await fs.mkdir(generatedDirectory, { recursive: true });
// Postgres custom types