File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 33import publicGenerators from './generators/index.mjs' ;
44import astJs from './generators/ast-js/index.mjs' ;
55import oramaDb from './generators/orama-db/index.mjs' ;
6- import { mkdirSync , statSync } from 'node:fs' ;
6+ import { mkdir , stat } from 'node:fs/promises ' ;
77
88const availableGenerators = {
99 ...publicGenerators ,
@@ -53,12 +53,12 @@ const createGenerator = markdownInput => {
5353 */
5454 const runGenerators = async ( { generators, ...extra } ) => {
5555 try {
56- if ( ! statSync ( extra . output ) . isDirectory ( ) ) {
56+ if ( ! ( await stat ( extra . output ) . isDirectory ( ) ) ) {
5757 throw new Error ( 'Output is not a directory' ) ;
5858 }
5959 } catch ( err ) {
6060 if ( err . code === 'ENOENT' ) {
61- mkdirSync ( extra . output , { recursive : true } ) ;
61+ mkdir ( extra . output , { recursive : true } ) ;
6262 }
6363 }
6464
You can’t perform that action at this time.
0 commit comments