@@ -370,15 +370,12 @@ export class Printer {
370370 const {
371371 axiosImportName = '' ,
372372 axiosImportFile,
373- fakerImportName = FAKER_IMPORT_NAME ,
374- fakerImportFile = FAKER_IMPORT_FILE ,
375373 runtimeValidate,
376374 runtimeMock,
377375 } = this . options || { } ;
378376 const { cwd = '/' , mainFile, typeFile = '.' , zodFile = '.' , mockFile = '.' } = this . configs ;
379377 const axiosImportFile2 = axiosImportFile || AXIOS_IMPORT_FILE ;
380378 const importPath = toImportPath ( axiosImportFile2 , cwd , mainFile ) ;
381- const fakerImportPath = toImportPath ( fakerImportFile , cwd , mockFile ) ;
382379
383380 this . #mainContent. push ( 'import' , [
384381 toImportString ( AXIOS_IMPORT_NAME , axiosImportName , importPath ) ,
@@ -407,6 +404,12 @@ export class Printer {
407404 }
408405
409406 if ( runtimeMock ) {
407+ const {
408+ fakerImportName = FAKER_IMPORT_NAME ,
409+ fakerImportFile = FAKER_IMPORT_FILE ,
410+ } = isBoolean ( runtimeMock ) ? { } : runtimeMock ;
411+
412+ const fakerImportPath = toImportPath ( fakerImportFile , cwd , mockFile ) ;
410413 const zodNames = [ ...this . #respZodNames. values ( ) ] . join ( ',' ) ;
411414 this . #mainContent. push ( 'import' , [
412415 `import ${ ENABLE_MOCK_NAME } from "${ toRelative ( mockFile , mainFile ) } ";` ,
0 commit comments